tinfanide Posted October 29, 2011 Share Posted October 29, 2011 I'm creating a website and discover that in my site font-size is a little bigger in Firefox than in IE.I use px as the unit of texts. Is there a cross-browser fix? Link to comment Share on other sites More sharing options...
Ingolme Posted October 29, 2011 Share Posted October 29, 2011 You should design your website to not depend strictly on font size because font sizes are very variable and you can't rely on them. Link to comment Share on other sites More sharing options...
tinfanide Posted October 29, 2011 Author Share Posted October 29, 2011 So do you mean I should use em or %? Link to comment Share on other sites More sharing options...
Ingolme Posted October 29, 2011 Share Posted October 29, 2011 It doesn't really matter what you use, just don't expect it to look the same size on all browsers. The point is that you should not make a design that is dependent on the font being the right size. Link to comment Share on other sites More sharing options...
tinfanide Posted October 29, 2011 Author Share Posted October 29, 2011 oh... but if my texts are placed inside a div, then the div has to be set "height: auto" in order to let the content decide the height of the div so that if the font-size is gettin bigger than expected, the div can still embrace it? Link to comment Share on other sites More sharing options...
Ingolme Posted October 29, 2011 Share Posted October 29, 2011 If you don't set the height at all, block elements do that automatically. Link to comment Share on other sites More sharing options...
tinfanide Posted October 29, 2011 Author Share Posted October 29, 2011 Oh, yes. I forgot the default value is auto. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.