Current location: Hot Scripts Forums » General Web Coding » CSS » css hyperlinks


css hyperlinks

Reply
  #1 (permalink)  
Old 06-03-04, 12:19 PM
nick1 nick1 is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 16
Thanks: 0
Thanked 0 Times in 0 Posts
css hyperlinks

Greetings,

i have a question regarding CSS hyperlinks. Here's what one of my sheets looks like:

====================
a:link{text-decoration:none; color:#0000ff; font-weight:bold;}
a:visited{text-decoration:none; color:#0000ff; font-weight:bold;}
a:hover{text-decoration:none; color:#00ff00; font-weight:bold;}

p.pic
{
position:absolute;
left:275px;
top:104px;
}

p.message
{
a:link{text-decoration:none; color:#0000ff; font-weight:normal;}
a:visited{text-decoration:none; color:#0000ff; font-weight:normal;}
a:hover{text-decoration:none; color:#00ff00; font-weight:normal;}
position:absolute;
top:475px;
}
============================

i want the hyperlinks in "p.message" to display as normal text, NOT BOLDED like the hyperlinks in "p.pic" appear. What do i need to alter in this code to make this happen?
i would like keep this all within one style sheet.

Thanks for your time,

Nick
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 06-16-04, 11:55 AM
colincameron colincameron is offline
Newbie Coder
 
Join Date: Oct 2003
Location: Somewhere cold
Posts: 22
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
p.message
{
a:link{text-decoration:none; color:#0000ff; font-weight:normal;}
a:visited{text-decoration:none; color:#0000ff; font-weight:normal;}
a:hover{text-decoration:none; color:#00ff00; font-weight:normal;}
position:absolute;
top:475px;
}
isnt valid css. try validating your css here, that may help

this is what your looking for

Code:
p.message {
position:absolute;
top:475px;
}

p.message a:link {
text-decoration:none; 
color:#0000ff; 
font-weight:normal;
}

p.message a:visited {
text-decoration:none;
 color:#0000ff; 
font-weight:normal;
}

p.message a:hover{
text-decoration:none;
color:#00ff00; 
font-weight:normal;
}
you can also compact the code since your link and visited are the same

Code:
p.message {
position:absolute;
top:475px;
}

p.message a:link, p.message a:visited {
text-decoration:none; 
color:#0000ff; 
font-weight:normal;
}

p.message a:hover{
text-decoration:none;
color:#00ff00; 
font-weight:normal;
}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #3 (permalink)  
Old 06-17-04, 04:25 PM
EvilHaider EvilHaider is offline
Newbie Coder
 
Join Date: Apr 2004
Posts: 61
Thanks: 0
Thanked 0 Times in 0 Posts
Nice link colincameron!
__________________
**
Tutorial Maniacs
**
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Css help Netbreak CSS 9 07-17-04 01:44 AM
css generator frank1002 Job Offers & Assistance 2 05-09-04 08:54 PM
css generator frank1002 Script Requests 0 05-07-04 04:29 PM
Hyperlinks problem fraggle PHP 2 03-16-04 12:03 PM


All times are GMT -5. The time now is 11:47 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.