homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member
Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

font-size:1px in body tag not works in firefox

 6:01 am on May 28, 2008 (gmt 0)

Can anyone tell me why this not works in FF?

/* CSS */


I ve kept the above piece of css in my page . and applied <br> tags to enforce some space between tables. this is works fine in IE and all my <br> tags are rendered with a font size of 1px in IE . but not exactly in the Firefox . it shows huge gaps wherever i used <br> tags.i think the font-size for <br> tags in FF not set to 1px.

why this 1px font size is not supported in Firefox? any other way to make my br are treated with 1px font size?



 7:19 am on May 28, 2008 (gmt 0)

hi visu

you shouldn't really be controlling the size of your gaps between elements using a <br>, you should really just use a margin directly on your tables and not use the <br> at all, setting a font-size of 1px onto the body seems like it would cause a lot more problems than it would fix

perhaps something like table {margin-bottom: 3px;} would be more x-browser friendly


 5:05 pm on May 31, 2008 (gmt 0)

visu, I agree with SuzyUK's advice to you.

FireFox puts a default "floor" on how small font-size will display. This is designed to preserve readability. It makes complete sense.

However, if you're hell-bent on using BR why use font-size? I've never done it, but I know of no reason why a height cannot be set for a BR element.


 6:50 pm on Jun 3, 2008 (gmt 0)

SuzyUK is absolutely right, and in fact some have argued that the <br> element itself is unnecessary.

But the immediate answer to the question is to set line-height to 1px in addition to font-size.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved