Page 1 of 1

Asterisk problem (CSS)

Posted: Fri Jun 25, 2010 10:16 am
by mastermp2
Hello

I am having a problem when using the asterisk is CSS.

The problem is, that is seems that when using the asterisk, I can't used the <font> tag appropriately in other elements.

Here's an example:

<style type="text/css">
* {
font-family:Arial, Helvetica, sans-serif
color:#696969;
font-size:11px;
}

</style>

<p> Hello world </p> (this appears with font size 11px, color #696969; and font family: Arial, Helvetica, sans serif)

<p> <font face="Arial, Helvetica, sans-serif" size="8" color= blue> This should be bigger </font> </p> (this doesn't appear bigger but appears blue)

<p> <font face="Arial, Helvetica, sans-serif" size="1" color= red> This should be smaller </font> </p> (this appears smaller and red)

------------------------------------------------------

Bottom line, it seems that the asterisk (*) not only establishes the "default format" and stuff, but it also seems to establish a limit

Can you help me overcome this issue? I want to be able to put text in a bigger size without having to eliminate the asterisk since most of the text should be smaller

Re: Asterisk problem (CSS)

Posted: Fri Jun 25, 2010 10:39 am
by mikosiko
Edit: because Pytrin gave the right answer... mine didn't contribute to the solution

Re: Asterisk problem (CSS)

Posted: Fri Jun 25, 2010 10:44 am
by Eran
The <font> tag is deprecated, so you'd do well to stop using it. Use CSS selectors instead

CSS

Code: Select all

p.larger {
    font-family:Arial, Helvetica, sans-serif;
    font-size:8pt;
    color: blue;
}
HTML

Code: Select all

<p class="larger">....</p>