PDA

View Full Version : Leading in Different browsers


wolfmanbc
03-20-2009, 02:56 PM
I don't know if this is always the case but it seems to me that Firefox reads the leading differently then in Safari, at least the site I am currently working on. Its more open, more space between lines. Does IE read it similar to firefox? And does anyone know how to fix this problem?

Corrosive
03-20-2009, 03:10 PM
I don't know if this is always the case but it seems to me that Firefox reads the leading differently then in Safari, at least the site I am currently working on. Its more open, more space between lines. Does IE read it similar to firefox? And does anyone know how to fix this problem?

You can play about with the line-height CSS property and see if you get the desired results. Personally I find it pretty hard to get consistency across all browsers.

coloeagle
03-20-2009, 03:18 PM
You can also reset the browser default margin and padding to zero.
General;
body {
margin:0;
padding:0;
}

Or be more specific
p, h1, h2 {
margin:0;
padding:0;
}
Then you can set these as you desire for your design;
wrapper p {
margin:5px;
padding:5px;
}
wrapper h1, h2 {
margin:5px 10px;
padding:5px 10px;
}

d a v e
03-20-2009, 03:27 PM
that doesn't alter the line height (which is leading's equivalent in css). unfortunately it's just a bit different between browsers. i would aim for pleasant balance between all of them - or a specific browser if that is favoured by your type of users

coloeagle
03-20-2009, 03:34 PM
that doesn't alter the line height (which is leading's equivalent in css). unfortunately it's just a bit different between browsers. i would aim for pleasant balance between all of them - or a specific browser if that is favoured by your type of users
Ahh I stand something learned. :)
Then possibly use of the asterisk to set the line height cross browser?
* {line-height:15px;}

domedia
03-24-2009, 03:12 AM
Careful as this will set the line height for *everything* :)