Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

CSS class doesn't get applied

Status
Not open for further replies.

TheDust

Programmer
Aug 12, 2002
217
US
I am having some strange CSS problems... I need someone to tell me why one class is being applied and the other isn't when I'm using the exact same technique on both. You can see my test URL at:


The CSS is linked externally and includes the following class declarations:

Code:
.alert {
    color:red;
    font-weight:bold;
}
.subheadline {
    font:bold 16px;
}

On that test page, I just have the following code to test these classes:

Code:
<span class="alert">fdafsdfads</span><br />
<span class="subheadline">fdsadfasafds</span>

The "alert" text looks fine, but the "subheadline" text doesn't get applied. What gives?
 
Is this any better?

Code:
.alert {
    color: red;
    font-weight: bold;
}
.subheadline {
    font-weight: bold;
    font-size: 16px;
}

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Yup - that takes care of it.

So... XHTML standards don't allow CSS to define more than one style element in a declaration? I can't define all of my font properties in one line? Weak.
 
.subheadline { font: bold 16px; }

worked just fine for me as well.

*cLFlaVA
----------------------------
A polar bear walks into a bar and says, "Can I have a ... beer?"
The bartender asks, "What's with the big pause?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top