sanfly Posted August 25, 2006 Share Posted August 25, 2006 Hi GuysUsing CSS, what is the best type of font size to use (eg: px, em etc) that will display the same font size in both IE and firefox, and also give absolute font sizes (ie: not relative other font sized defined futher up in the stylesheet)Cheers Quote Link to comment https://forums.phpfreaks.com/topic/18667-css-font-size/ Share on other sites More sharing options...
Ricklord Posted August 26, 2006 Share Posted August 26, 2006 Hi, I would use something like font size 12px and font style tahoma with a line height of 140% for my main content of a site.see below for example style:[code]content p { font-family: Tahoma; font-size : 12px; font-weight : normal; text-align:justify; color : #000000; background-color : transparent; line-height : 140%;}[/code]I've never had a problem with this in any browsers. As for having different font sizes for different text just give the style another name. like in my example i have got -content p- for paragraph if i wanted a header i would create another style called -content h1- then -h2- and so on. Naming the styles this way will link to the main container called content so if you have a container called sidebar for news you would use -sidebar p- or -sidebar h1- and so on. If creating links use -content a- and define the style for the link and then use -content a:hover- to define what the text would look like if you hover over the link. Also to get rid of the underline which is created in prgrams like dreamweaver add -text-decoration: none;- to the style for links. Hope this helps. Rick Quote Link to comment https://forums.phpfreaks.com/topic/18667-css-font-size/#findComment-80744 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.