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 December 3rd, 2003, 01:55 AM
SaraPHP SaraPHP is offline
Callin' PHP Docs !
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Jun 2003
Posts: 74 SaraPHP User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Question Applying CSS to a LINK

Hi all...i have a confusion i was wondering if u can help me solve it. I want to create a style for a certain portion of the page that involves links. This portion comes up a lot of times so i wanted to create a stylesheet.css page and place the values there....

A:link {text-decoration: none; color: #000000}
A:visited {text-decoration: none; color: #000000}
A:hover {text-decoration: none; font-weight: bold; color: #FF6600}

How ever now i've got each link with the style above. Is it possible to make a class that would actually have "A:...." with in it and then i can probably call it through a span or a div.

e.g <div class="speciallink"><ahref.......</a></div>
and in a normal case <ahref "this is a normal link">Normal Link</a>

I'd luv to hear form u folks !

Sara

Reply With Quote
  #2  
Old December 3rd, 2003, 02:48 AM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Cunning Linguist
Dev Shed God 10th Plane (9500 - 9999 posts)
 
Join Date: Jul 2003
Location: I used to live at home, now I stay at the house
Posts: 9,894 ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)ChiefWigs1982 User rank is Lieutenant General (80000 - 90000 Reputation Level)  Folding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner FolderFolding Points: 50746 Folding Title: Beginner Folder
Time spent in forums: 3 Months 2 Weeks 5 Days 14 h 36 m 5 sec
Reputation Power: 820
Facebook
It's bit long winded, but works fine. There might be an easier way of doing it, but I've never found one!...
Code:
<html>
<head>
<style type="text/css">
A:link {text-decoration: none; color: #000000}
A:visited {text-decoration: none; color: #000000}
A:hover {text-decoration: none; font-weight: bold; color: #FF6600}

.one A:link{color:blue;text-decoration:none;}
.one A:visited{color:blue;text-decoration:none;}
.one A:hover{color:green;text-decoration: none; font-weight: bold;}

.two A:link{color:red;text-decoration:none;}
.two A:visited{color:red;text-decoration:none;}
.two A:hover{color:blue;text-decoration: none; font-weight: bold;}

.three A:link{color:green;text-decoration:none;}
.three A:visited{color:green;text-decoration:none;}
.three A:hover{color:red;text-decoration: none; font-weight: bold;}
</style>
</head>
<body>
<a href="#">This is just a standard link on your page...</a><br>
<br>
<div class="one">
<a href="#">These are links of class "one"</a><br>
<a href="#">These are links of class "one"</a><br>
</div><br>

<div class="two">
<a href="#">These are links of class "two"</a><br>
<a href="#">These are links of class "two"</a><br>
<div><br>

<div class="three">
<a href="#">These are links of class "three"</a><br>
<a href="#">These are links of class "three"</a><br>
</div>
</body>
</html>
__________________
Support requests via PM will be ignored!
Sites: Route of Queue | Sinthetic - Alternative UK Hiphop
Read These: The General Rules Thread | The General FAQ Thread | NEW USERS - How to post a question

Sign up with Matched.co.uk and earn up to £15 per website every month!


Reply With Quote
  #3  
Old December 3rd, 2003, 04:45 AM
Arden's Avatar
Arden Arden is offline
HTML/CSS/Photoshop maven
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: CA
Posts: 184 Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level)Arden User rank is Corporal (100 - 500 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 6
Send a message via AIM to Arden
You can also do a.class1:hover {style} and so on.

Reply With Quote
Reply

Viewing: Dev Shed ForumsWeb DesignCSS Help > Applying CSS to a LINK


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 5 hosted by Hostway