November 5th, 2012, 02:04 AM
What is css code for <font size=1> ?
I have been teaching myself css code today to convert over parts of my webpage.
To define a slightly smaller font, I use the HTML code: <font size=1>
What would be the css code equivalent for this?
November 5th, 2012, 03:08 AM
It depends where you want the smaller font and by how much, but if you want your paragraph font size to be smaller than the main page font size (this is just an example) then you would apply it to the p tag in your css. It also depends if you want to set a specific pixel size or use ems to base it on the parent font size.
font-size: 16px; // This is actually the default size for browser fonts anyway
font-size: 14px; // Or, if using ems, 0.875em
November 5th, 2012, 06:28 PM
Welcome to DevShed Forums, helpneeded22.
It's best to avoid setting font-size in "px", pixels. (And "pt", points, may be fine for print stylesheets but shouldn't be used for other media.)
I recommend that you try using "font-size: xx-small" or "font-size: smaller".
More information: http://style.cleverchimp.com/font_si...ervals.html#cc
November 5th, 2012, 08:15 PM
Thanks, that is just what I was looking for. I really wanted to avoid going with a "set" size, and use something a little more relative, and I believe this it.
Originally Posted by Kravvitz
November 6th, 2012, 01:54 AM
style="font-size:10px; it is the equal of your question. Please have a look. and let me know.