css help

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

I have a style sheet that has this in it
.adtext {margin-left: 3px; line-height: 12pt;font-family: verdana; font-weight: bold; font-size: 10px; color: #145587; text-align: left;}'

Now see these ads at the bottom of this page, I want the underlines to be gone, is there a tag I can put in the code to take the underline away?

AyntRyte's picture

He has: 145 posts

Joined: Jun 2004

Add new link selectors. Doctor as necessary.

A:link.adtext {text-decoration: none}
A:visited.adtext {text-decoration: none}
A:hover.adtext {text-decoration: none}
A:active.adtext {text-decoration: none}

\\// Robert

The grass is always greener on the other side -- but that's because they use more manure.

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

Yeah, I noticed that thing in Firefox too, I can't figure out what's wrong with it.

Thanks for the help Smiling

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

.adtext {margin-left: 3px; line-height: 11pt;font-family: verdana; font-weight: bold; font-size: 10px; color: #145587; text-align: left; link: {text-decoration:none;} visited: {text-decoration:none;}
'

um, it still doesn't work? Is the code right?

Abhishek Reddy's picture

He has: 3,348 posts

Joined: Jul 2001

Bad syntax. Corrected:

.adtext {
  margin-left: 3px;
  line-height: 11pt;
  font-family: verdana;
  font-weight: bold;
  font-size: 10px;
  color: #145587;
  text-align: left;
}
.adtext:link {text-decoration:none;}
.adtext:visited {text-decoration:none;}
'

I'm not sure about those last two; I think only "a" can have those pseudo-selectors. But that's valid syntax there. Smiling

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

Nope, still doesn't work, could there be something else in the style sheet that is making it have an underline?

AyntRyte's picture

He has: 145 posts

Joined: Jun 2004

IMO, it isn't the stylesheet. The selectors we've shown you will work; you just have to apply the class to the links. The problem is that the links are generated by a script. You'll have to dig into the script to see if you can apply it there.

\\// Robert

The grass is always greener on the other side -- but that's because they use more manure.

teammatt3's picture

He has: 2,102 posts

Joined: Sep 2003

ah, I see what your saying, great, now I have to dig through a zillion lines of code Sad

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.