Solved

CSS not working for one class (documents attached)

Posted on 2012-12-23
5
470 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
ID: 38717918
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
ID: 38718301
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
ID: 38721589
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
ID: 38718688
Did my answer not help you out?
0
 

Author Closing Comment

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

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Make Line Items Look Good Over Mobile 2 63
Html5 string 3 23
div to fit another div 8 23
Sort Order Icons on HTML Table 3 25
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

821 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