CSS Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsWeb DesignCSS Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
  #1  
Old March 7th, 2002, 02:21 AM
Crinos's Avatar
Crinos Crinos is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Kristiansand - Norway
Posts: 122 Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 8 h 14 m 39 sec
Reputation Power: 13
Post Overwriting a CSS style once.

I have CSS for handeling links.
Code:
a:link {  
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 12px;
 color: #0000FF;
 text-decoration: none;
; font-style: normal
}
and so on for visited, active and hover.

My problem is that at some few places I want to alter the link text to be at bit smaler.

How could I acomplish this?
__________________
-=| Agnus Dei |=-
http://www.crinos.org

Reply With Quote
  #2  
Old March 7th, 2002, 03:41 AM
noodles1100's Avatar
noodles1100 noodles1100 is offline
Corporate Stooge
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Aberdeen, Scotland
Posts: 134 noodles1100 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Create another style in the stylesheert.

i.e.

a.classname {font-size: 10px;}

then when you create the link use the class attribute.

i.e.

<a class="classname" href="linkpage.asp">Link Text</a>

Hope that helps.
__________________
Never sign your code....it leaves you liable!

Reply With Quote
  #3  
Old March 7th, 2002, 05:02 AM
Crinos's Avatar
Crinos Crinos is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Kristiansand - Norway
Posts: 122 Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 8 h 14 m 39 sec
Reputation Power: 13
That was the first thing I tried.

But wont work. I've allso tried to make a new style with a new set of link styles within... But still doesn't work.

Code:
.submenu {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 9px;
 color: #000000;

a:link {  
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 9px;
 color: #0000FF;
 text-decoration: none;
; font-style: normal
}

a:visited {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 9px;
 color: #0000FF;
 text-decoration: none;
; font-style: normal
}

a:active {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 9px;
 color: #FF0000;
 text-decoration: underline;
; font-style: normal
}

a:hover {
 font-family: Verdana, Arial, Helvetica, sans-serif;
 font-size: 9px;
 font-style: normal; color: #0000FF;
 text-decoration: underline;
}
}

Any Ideas?

Reply With Quote
  #4  
Old March 7th, 2002, 05:20 AM
noodles1100's Avatar
noodles1100 noodles1100 is offline
Corporate Stooge
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2001
Location: Aberdeen, Scotland
Posts: 134 noodles1100 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
I use that all the time!! That was ripped out of a CSS that I'm using at the moment!

Try putting the general a.link a.hover etc at the bottom of the CSS and the custom classes at the top. After all CSS can be picky about ordering and comments.

Reply With Quote
  #5  
Old March 7th, 2002, 10:37 AM
degsy degsy is offline
Contributing User
Dev Shed Intermediate (1500 - 1999 posts)
 
Join Date: Nov 2001
Posts: 1,882 degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level)degsy User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 5 Days 21 h 19 m 30 sec
Reputation Power: 13
Noodles way should work

<html>
<head>
<style>
a:link
{ color: blue; font-size: 10px; text-decoration: underline }
a:active
{ color: blue; font-size: 10px; text-decoration: underline }
a:visited
{ color: blue; font-size: 10px; text-decoration: underline }
a:hover
{ color: green; font-size: 10px; text-decoration: none }

a.menu:link
{ color: red; font-size: 14px; font-weight: bold; text-decoration: underline }
a.menu:active
{ color: red; font-size: 14px; font-weight: bold; text-decoration: underline }
a.menu:visited
{ color: red; font-size: 14px; font-weight: bold; text-decoration: underline }
a.menu:hover
{ color: green; font-size: 14px; font-weight: bold; text-decoration: none }
</style>
</head>

<body>
<p><a href="#" class="menu">Menu Link 1</a><br>
<a href="#" class="menu">Menu Link 2</a></p>
<p><a href="#">Normal Link 1</a><br>
<a href="#">Normal Link 2</a></p>
</body>
</html>

Reply With Quote
  #6  
Old March 8th, 2002, 02:30 AM
Crinos's Avatar
Crinos Crinos is offline
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2001
Location: Kristiansand - Norway
Posts: 122 Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level)Crinos User rank is Sergeant (500 - 2000 Reputation Level) 
Time spent in forums: 1 Day 8 h 14 m 39 sec
Reputation Power: 13
Thumbs up

Got it working now... thanks. I allso had a typo error, wich I didn't see before...

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Overwriting a CSS style once.


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway