Help - Search - Members - Calendar
Full Version: Text-decoration Code, Somethings Wrong
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > HTML and CSS
k.digennaro
Well I'm having problems with the
CODE
text-decoration
I want to remove the bullets and the under lines on my links in my nav bar. I know this is a way to do it, but when I enter it nothing happens. Here's an example of what code I'm using.

CODE
#content{
background-color:gray;
border:black 1px solid;
width:100%;
height:450px;
}

#navbar{
background-color:white;
border:black 1px solid;
width:30%;
height:350px;
[color="#FF0000"]text-decoration:none;[/color]
}

As far as I know that's correct code, I even check it on w3. But it doesnt do what I want it to do. Ive seen videos etc of people using that code to remove the underline but when ever i try to do it well.... no trabaja.......

Thanks,
Kevin
Jetteh22
To remove the underline:

CODE
#navbar a {
text-decoration: none;
}


Add that to your link styles and to remove the bullets...

I'm guessing you're using UL so...

CODE
#navbar ul {
list-style-type: none;
}


Hope that helped.
Andrew
Yea kevin, you have to specify you dont want decoration on the a tag also you can do it on the a:hover too to make it plain jane when you hover on links also.

#navbar a:hover {
text-decoration: none;
}
k.digennaro
ah that makes sense, thanks for the help
awesome, it also works for the entire document? correct? for instance
CODE
a {
text-decoration: none;
color:black;
font-weight:bold;
}

ul {
list-style-type: none;
}
Andrew
Yes correct it globally makes no text decoration. But then if you decided you wanted a text-decoration: underline; say in your #news div it would over ride the global value. (does that make sense?)
k.digennaro
yeah, thanks trippin, Ive like tripled my knowledge of HTML/CSS in the last 2 days lol it just kinda clicked and I started to under stand it better smile.gif
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.