Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

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

Posted on 2010-08-19
5
Medium Priority
?
193 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 2000 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

[Webinar] Lessons on Recovering from Petya

Skyport is working hard to help customers recover from recent attacks, like the Petya worm. This work has brought to light some important lessons. New malware attacks like this can take down your entire environment. Learn from others mistakes on how to prevent Petya like worms.

Question has a verified solution.

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

CSS3 Custom checkboxes This article shows how to style the checkbox form element using only CSS. Works in: Chrome, FF, Safari, Opera, IE9+ Uses modernizr.js to check for :checked pseudo class, falling back to plain old checkboxes (IE8 and bel…
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
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 tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Suggested Courses

604 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