Solved

CSS not working for one class (documents attached)

Posted on 2012-12-23
5
462 Views
Last Modified: 2012-12-26
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
0
Comment
Question by:MBarongan
  • 3
  • 2
5 Comments
 
LVL 29

Expert Comment

by:IrogSinta
Comment Utility
Your stylesheet is missing a closing curly bracket for your category class.
.category {font-family: arial;
         font-size: 2em;
         text-align: center;
         line-height: 2.25em; }
0
 

Author Comment

by:MBarongan
Comment Utility
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.
0
 

Author Comment

by:MBarongan
Comment Utility
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.
0
 
LVL 29

Accepted Solution

by:
IrogSinta earned 500 total points
Comment Utility
Did my answer not help you out?
0
 

Author Closing Comment

by:MBarongan
Comment Utility
Your answer was perfect. I just didn't close the question properly. Sorry for the confusion. And thanks for your help.
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
In this tutorial viewers will learn how to customize the background color and font color of highlighted text using the ::selection element in CSS Begin by defining the selected text as an element in CSS by typing "::selection": Style the ::selection…
In this tutorial viewers will learn how to embed an audio file in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: : The declaration should display (CODE) HTML5 is supported by the most recent versions of all major browsers…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now