Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more

Go Back   Webmaster Forums - Webmaster forum for HTML, PHP, ASP, CSS and more > Web Design Forum > HTML / CSS
User Name
Password

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 07-30-2005, 09:29 PM   #1 (permalink)
vvaldir
Junior Member
 
Join Date: Jul 2005
Posts: 18
Default CSS- no underline for links

Hello,

I am new to style sheets. All I want to do is make the links on my pages not to be underlined. However I want the links highlighted or a different color on mouseover.

This is what I have added to the top of my html doc but it does not work.

a:hover {
text-decoration: none
background-color: #CCCCCC
}

How can I do this???

tia
vvaldir is offline   Reply With Quote
Sponsored Links
Old 07-30-2005, 09:51 PM   #2 (permalink)
sitedesigner
Junior Member
 
Join Date: Jul 2005
Posts: 20
Default

yea, do this

a, a:link, a:visited {
text-decoration: none
background-color: #CCCCCC
}

a:hover {
text-decoration: none
background-color: #CCCCCC
}
sitedesigner is offline   Reply With Quote
Old 07-30-2005, 10:54 PM   #3 (permalink)
vvaldir
Junior Member
 
Join Date: Jul 2005
Posts: 18
Default

Well that's what I have but it does nothing.... do I have a syntax error or something?
vvaldir is offline   Reply With Quote
Old 07-30-2005, 11:01 PM   #4 (permalink)
JustMadMike
Junior Member
 
Join Date: Jul 2005
Posts: 9
Default

OK, ive VERY new to CSS at the moment but sitedesigner didn't state how to change the color of the text on mouseover. Maybe try this:

Code:
<style> a, a:link, a:visited { text-decoration: none; background-color: #CCCCCC; } a:hover { color: white; text-decoration: none; background-color: #CCCCCC; } </style>

Someone correct me if i'm wrong please, thanks.

JustMadMike
JustMadMike is offline   Reply With Quote
Old 07-31-2005, 08:56 AM   #5 (permalink)
vvaldir
Junior Member
 
Join Date: Jul 2005
Posts: 18
Default

Thanks ~JustMadMike

I was missing the--> ;
vvaldir is offline   Reply With Quote
Old 07-31-2005, 08:58 AM   #6 (permalink)
JustMadMike
Junior Member
 
Join Date: Jul 2005
Posts: 9
Default

It's OK, tell me if it actually works :lol: seriusly i havent done any css, i've just read about it a few days ago.
JustMadMike is offline   Reply With Quote
Old 07-31-2005, 03:32 PM   #7 (permalink)
susanh
Junior Member
 
Join Date: Jun 2005
Posts: 29
Wink

You could simply create a default.css file like below and save it to your web space root directory or where your index html file lives. Just add a line to your web doc like so:

Right before the /head
<LINK href="Default.css" rel=stylesheet type="text/css">
</head>

default.css
PHP Code:
BODY {
    
FONT-SIZE10ptFONT-FAMILYVerdana
}
A:hover {
    
COLORredFONT-FAMILYVerdanaTEXT-DECORATIONunderline
}
H3 {
    
FONT-WEIGHTboldFONT-SIZE12ptFONT-FAMILYVerdana
}
TABLE {
    
FONT-SIZE10ptFONT-FAMILYVerdana
}
{
    
FONT-SIZE9ptFONT-FAMILYVerdana
}
TD {
    
FONT-SIZE10ptFONT-FAMILYVerdana
}
.
topLinks {
    
FONT-SIZE8ptCOLORdarkblueFONT-FAMILYVerdanaTEXT-DECORATIONnone


So code your links like this:
<a class=topLinks href="somefile.zip"><b>some_text</b></a>

Hope this helps
susanh is offline   Reply With Quote
Old 07-31-2005, 09:17 PM   #8 (permalink)
JustMadMike
Junior Member
 
Join Date: Jul 2005
Posts: 9
Default

Nice one susanh.
JustMadMike is offline   Reply With Quote
Old 04-21-2008, 07:27 AM   #9 (permalink)
SandraRubart
Junior Member
 
Join Date: Mar 2008
Posts: 8
Post Desperate Housewives : Choosing room colors with virtual painting software

Hi there!

I'm about to paint my rooms and now choosing appropriate colors.
Found program to pick painting colors right on the photos of interior
or house facade, here's link : http://www.housepaintcolorschemes.com

Think it will help you too.

And by the way, if you wish to exchange photos in the format of this program,
please write me at: greensandra DOG gmx DOT com

Cheers,
Sandra
SandraRubart is offline   Reply With Quote
Old 06-09-2008, 02:51 AM   #10 (permalink)
silentcelle
Junior Member
 
Join Date: Jun 2008
Location: Singapore
Posts: 6
Send a message via MSN to silentcelle
Default Re: CSS- no underline for links

Quote:
Originally Posted by JustMadMike
OK, ive VERY new to CSS at the moment but sitedesigner didn't state how to change the color of the text on mouseover. Maybe try this:

Code:
<style> a, a:link, a:visited { text-decoration: none; background-color: #CCCCCC; } a:hover { color: white; text-decoration: none; background-color: #CCCCCC; } </style>

Someone correct me if i'm wrong please, thanks.

JustMadMike

Susanh's default.css would work....But just in case vvaldir want to use inline css for some reason, it would be more proper for JustMadMike's code to start with <style type="text/css"> instead. So the new code would be

Code:
<style type="text/css"> a, a:link, a:visited { text-decoration: none; background-color: #CCCCCC; } a:hover { color: white; text-decoration: none; background-color: #CCCCCC; } </style>
silentcelle is offline   Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

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

Points Per Thread View: 1.00
Points Per Thread: 11.00
Points Per Reply: 5.00



» Sponsors

» Links

» Affiliates
Web Hosting
Online Backup Reviews
Marketing Find
Merchant Select
SiteMap Builder
Host Compare
Dedicated Servers

» Links

» Sports Network
Paintball Forum
Football Forum
Hockey Forum
Golf Forum
Boxing Forum
Lacrosse Forum
Baseball Forum
SnowBoarding Forum
Soccer Forum
MMA Forum


All times are GMT -4. The time now is 10:39 PM.



LinkBacks Enabled by vBSEO 3.0.0 RC8
Webmaster Forums