HighDots Forums  

Will margins look the same in other browsers?

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


Discuss Will margins look the same in other browsers? in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Lauri Raittila
 
Posts: n/a

Default Re: Will margins look the same in other browsers? - 12-07-2005 , 05:06 PM






in comp.infosystems.www.authoring.stylesheets, namenotgivenhere wrote:
Quote:
Will the following css have the same visual result in most modern browsers
as it does in IE6? TIA

p { margin-top: 6px; margin-bottom: 6px}
No.

Quote:
ul { margin-top: 6px; margin-bottom: 6px}
No.

Both work just fine in technical sence. But different browsers and
computers have different defaults.

For example if I have 5mm high letters on high PPI screen, there seems to
be no space between paragraphs. On low PPI screen, there is noticeable
space.

Note that if you style lists, there is quite different defaults for
different list elements in different browsers.


--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>


Reply With Quote
  #2  
Old   
namenotgivenhere
 
Posts: n/a

Default Will margins look the same in other browsers? - 12-07-2005 , 05:11 PM






Will the following css have the same visual result in most modern browsers
as it does in IE6? TIA

p { margin-top: 6px; margin-bottom: 6px}
ul { margin-top: 6px; margin-bottom: 6px}



Reply With Quote
  #3  
Old   
Steve Pugh
 
Posts: n/a

Default Re: Will margins look the same in other browsers? - 12-07-2005 , 05:26 PM



namenotgivenhere wrote:
Quote:
Will the following css have the same visual result in most modern browsers
as it does in IE6? TIA

p { margin-top: 6px; margin-bottom: 6px}
ul { margin-top: 6px; margin-bottom: 6px}
Depends.

Is your doctype triggering standards or quirks mode? Should there be
any collapsing margins?

Steve



Reply With Quote
  #4  
Old   
Steve Pugh
 
Posts: n/a

Default Re: Will margins look the same in other browsers? - 12-08-2005 , 03:02 AM



Steve Pugh wrote:

Quote:
If p and ul and the only elements you use in yout HTML then the above
styles will give 6px gaps between each adjacent element in conforming
browsers (ignoring cases where users over ride your styles with their
own preferences).
Oh, and allowing for different browsers having different vertical
margins on <li> elements which may affect the appearance of your <ul>s.

Steve



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.