Solved

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

Posted on 2010-08-19
5
189 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
  • 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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Introduction If you're like most people, you have occasionally made a typographical error when you're entering information into an online form.  And to your consternation, the browser remembers the error, and offers to autocomplete your future entr…
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

830 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