View Full Version : Overriding CSS code?


i_love_sailors
08-30-2003, 03:33 PM
Hi all,

I am using CSS on my site, and along with that I have hover "decorations" (for lack of a better word) for my links.

My question is, is there a way to override these codes using HTML? I am going to be posting ad banners for other sites on my site, with links to that particular site, and I don't want the "decoration" to cover the banner (I think it would look really stupid).

Thanks!

* kristin *

pb&j
08-30-2003, 03:58 PM
create a class link and apply that to your specific banner links.

example...

.banner a:link {styles here;}
.banner a:hover {styles here;}

then in the link coding, add the class...

<a href="somesite.com" class="banner">
<img src="banner.gif" border="0">
</a>

i_love_sailors
08-30-2003, 04:36 PM
Hrm, it didn't seem to work ...

I already have a divclass set up for that section, as it's a table. Here's the code :

.padads
{ font-family: verdana;
font-size: 8 pt;
color: #FFFFFF;
padding-top: 15px;
padding-left: 20px;
padding-right: 15px;
padding-bottom: 775px }

Should I just add the link attributes to that? My site went beserk when I made the .banner class. How do I go about getting the link attributes in there, since the brackets have to be like "a:link {"?

* kristin *

pb&j
08-30-2003, 05:58 PM
try this...

/* keep your original class */
.padads
{font-family: verdana;
font-size: 8 pt;
color: #FFFFFF;
padding: 15px 20px 15px 775px;}

/* then add some link properties to that class as well */
.padads a:link {styles here;}
.padads a:hover {styles here;}

in your normal coding, you already have the class specified, so that should be fine.

i_love_sailors
08-30-2003, 08:57 PM
Yay! Thanks so much for your help, it worked. ; ]

* kristin *