Reputation: 6807
Hi
I am having a style class for font tag, If size of the attribute is 1. I am setting the following style.
font[size = 1]
{
font-size : small;
}
It works in FF , chrome but not in IE
Can anyone explain how to make that work in IE?
Upvotes: 1
Views: 755
Reputation: 261
What if you specify 1pt like font[size = 1pt] { font-size : small; }
Upvotes: 0
Reputation: 684
I would recommend to not use the font tag at all. It has no semantic meaning. A better way would be to create a class that holds your desired font style. You can then simply assign this class to any element that you want to apply that style to.
E.g.: CSS
.smallType {
font-size: small;
}
HTML
<p class="smallType">Hey, look at me! I'm small!</p>
Upvotes: 0
Reputation: 67194
The <font>
tag has been deprecated and probably won't work as you expect. This is old, old, old technology. You should wrap it in a span or other element (depending on usage) with a class:
HTML
<span class="myClass">Text example here!</span>
CSS
.myClass
{
font-size: small; /*whatever you need*/
}
This is supported by all browsers as it's standard CSS.
:)
Upvotes: 1
Reputation: 6943
The font tag is deprecated and should die.
Please use paragraph tags (<p>
), or span (<span>
) to style specific text inside a paragraph tag instead.
<style type="text/css">
.pClass{
color:red;
}
.spanClass{
font-size:small;
}
</style>
<p class="pClass">This is <span class="spanClass">my paragraph</span>, it contains text</p>
Upvotes: 1