Solved

How to define a special font-size to spaecial class in CSS

Posted on 2010-08-19
5
190 Views
Last Modified: 2012-05-10
Hi,
I have two types of links (<a href>
The main type I want to use font size=14px.
but in the class="small" type I want to use 10px.
I set the class to the small types and use the CSS that is attached.
But it doesn't work (all the fonts are displayed in the large size (14px).
Please note that if I change the A:link in the CSS to 10px than all the links are small (10px) but this is not what I want.
MyTree1280.css
0
Comment
Question by:VapiSoft
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 11

Expert Comment

by:rajvja
ID: 33475978
Can you post your class declaration and HTML?
0
 
LVL 4

Expert Comment

by:Morrisproject
ID: 33476129
CSS would be

a {font-size:14px;}
a.small {font-size:10px;}

Just ensure your small links are like...
<a href="google.com" title="" class="small">This is a small link</a>

should work fine
0
 

Author Comment

by:VapiSoft
ID: 33476583
doesn't work.
See the file.
MyTree1280.css
0
 
LVL 4

Accepted Solution

by:
Morrisproject earned 500 total points
ID: 33476999
ok,

Add this after each line for small font
a.small {font-size:10px !important;}

adding the ' !important' will mean it is more important than any other overriding styles.

If it still doesn't work, then post the html you are using. Thanks
0
 

Author Closing Comment

by:VapiSoft
ID: 33477525
Thanks
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Css regex 6 51
How can I make a div layout like the one in the image 2 57
Can't get js code to execute 8 36
Internet Explorer View > Style menu 3 29
CSS is a visual language used to classify objects and define rules about how they should be displayed. CSS skills aren’t restricted to developers anymore, there is a big benefit to having a basic understanding of the language, regardless of your occ…
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 define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…

740 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