MBarongan
asked on
CSS not working for one class (documents attached)
My webpage does not respond to a class named .topic in my CSS. I'm applying .topic to four <td> tags in my webpage. Here is the formatting in .topic.
.topic {font-variant: small-caps;
text-align: center;}
This doesn't work. But if I embed .topic in the head of my webpage as shown below, the formatting works.
<style type="text/css">
.topic {font-variant: small-caps;
text-align: center;}
</style>
If you copy the .topic formatiing from the CSS and paste it between <style type="text/css"> and </style>, you'll see what I'm talking about. Why does .topic work as an embedded style but not from an external style sheet?
stylesheet.css
aSurgery.htm
.topic {font-variant: small-caps;
text-align: center;}
This doesn't work. But if I embed .topic in the head of my webpage as shown below, the formatting works.
<style type="text/css">
.topic {font-variant: small-caps;
text-align: center;}
</style>
If you copy the .topic formatiing from the CSS and paste it between <style type="text/css"> and </style>, you'll see what I'm talking about. Why does .topic work as an embedded style but not from an external style sheet?
stylesheet.css
aSurgery.htm
ASKER
Yes, that was the problem. I was too busy focusing on .topic that i didn't notice that .category above .topic was missing a bracket. Thank you.
ASKER
I've requested that this question be closed as follows:
Accepted answer: 0 points for MBarongan's comment #a38718301
for the following reason:
Issue is resolved.
Accepted answer: 0 points for MBarongan's comment #a38718301
for the following reason:
Issue is resolved.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Your answer was perfect. I just didn't close the question properly. Sorry for the confusion. And thanks for your help.
.category {font-family: arial;
font-size: 2em;
text-align: center;
line-height: 2.25em; }