Trouble with font-size

zixserro

New Member
I've seen that <font size> is being phased out by CSS's font-size, so I'm trying to use it, but it seems to never work the way I want. The text is always the same size no matter what value I put after the colon. I use Dreamweaver to put sites together, and when I type, for example <font size="-1"> around a piece of text, it shows that it reduces in size in the preview window, but when I test the sites, the text is still all the same size. I figured that to fix this problem, I'd just use styles and the font-size attribute, but it doesn't seem to change anything either.
 

chrishirst

Well-Known Member
Staff member
I'd just use styles and the font-size attribute,
font-size is a CSS property not an attribute.

If neither work, you must having something else incorrect and we need to see a URI (or code)
 

chrishirst

Well-Known Member
Staff member
check out this website it will help you with all kinds of css attribute, http://www.w3schools.com/css/css_attribute_selectors.asp,
????


attribute selectors are used to make CSS rules be specific to HTML elements with a particular value for that element attribute.


font-size is a CSS PROPERTY, the size attribute would be applied to the long since deprecated HTML font element.

eg:
HTML:
 <font size="1">This text will be set at size 1, the smallest size in HTML</font>
 

zixserro

New Member
After stepping away from it for a while, then coming back, I realized the mistake I'd made and was able to fix it; I was still trying to style <font> when I should have been styling <p>.

font-size is a CSS property not an attribute.

If neither work, you must having something else incorrect and we need to see a URI (or code)

My apologies for the semantic error.
 

CaldwellYSR

Member
After stepping away from it for a while, then coming back, I realized the mistake I'd made and was able to fix it; I was still trying to style <font> when I should have been styling <p>.



My apologies for the semantic error.

The <font> shouldn't be in there at all. In case that wasn't clear from the other's posts.
 

chrishirst

Well-Known Member
Staff member
My apologies for the semantic error.

No problem, It may seem pedantic but in the web development world getting the parlance right is the only way to be succinct in the question or answer and avoid any mis-understanding, especially where many of the participants do not speak the same cultural language.
 
Top