HighDots Forums  

CSS Margin problem

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss CSS Margin problem in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Tony Benham
 
Posts: n/a

Default CSS Margin problem - 08-14-2003 , 05:35 AM






I'm having problems with a css layout where a margin is being inserted with
the wrong width. I believe it's my css that's at fault since it is wrong in
netscape 7.1, opera,7.11 and IE6 but I cannot see what is wrong.
The page with the problem is www.woodleyzebrasfc.com and the incorrect item
is shown under the left hand navigation menu under links. The link to ysr
has a margin applied which is causing the space between it and the next item
fifa rules. YSR is in a linkpic div, which has a margin of 0, but it appears
to have a margin applied which looks like 1em, the margin applied by
div#sidebar div, which is two levels up. I thought the margin applied
nearest the div has priority. The css file is at
http://www.woodleyzebrasfc.com/getcss.html

Can give me some clues as to what I'm doing wrong here ?

Regards
Tony



Reply With Quote
  #2  
Old   
Eric Jarvis
 
Posts: n/a

Default Re: CSS Margin problem - 08-14-2003 , 10:56 AM






Tony Benham wrote:
Quote:
I'm having problems with a css layout where a margin is being inserted with
the wrong width. I believe it's my css that's at fault since it is wrong in
netscape 7.1, opera,7.11 and IE6 but I cannot see what is wrong.
The page with the problem is www.woodleyzebrasfc.com and the incorrect item
is shown under the left hand navigation menu under links. The link to ysr
has a margin applied which is causing the space between it and the next item
fifa rules. YSR is in a linkpic div, which has a margin of 0, but it appears
to have a margin applied which looks like 1em, the margin applied by
div#sidebar div, which is two levels up. I thought the margin applied
nearest the div has priority. The css file is at
http://www.woodleyzebrasfc.com/getcss.html

Can give me some clues as to what I'm doing wrong here ?

I don't have the time to play around with it to check but
my guess would be that you are wrong in assuming the
nearest margin has precedence...my experience is that
margins are cumulative...the margin applies to the
element no matter what margins are applied to
neighbouring elements

--
eric
www.ericjarvis.co.uk
"Hey Lord don't ask me questions
There ain't no answer in me"


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.