View Full Version : Link Rollovers: Changing BG Color Help!


amber2403
08-02-2005, 09:30 AM
Hello, ya'll.

Okay so I went browsing and I stumbled upon this site, http://www.only-for-love.org/. If you run your mouse, if you have I.E., you'll notice that the bg and text changes as the mouse runs over it. No matter what I do. I just can't seem to work my link classes to work that way.

This is what I got, http://www.sultry-stare.net/shadowed/. Those aren't exactly the colors I plan on using, just so I can see it all a little better, but if you look, you'll see that the line doesn't extend all of the way out like hers does.

I have a position class labed "Div Class="blog"" before it so that I don't have to position each individual class, but put them all in between the class with the correct positioning, if that makes sense.

This is my CSS:

a.links:link {background-color: #00FF00; color: #0000ff;}
a.links:visited {color: #ff0000;}
a.links:active {color: #00FF00;}
a.links:hover {background-color: #ffffff;}
a {text-decoration: none}

The "links" is the name of the class I tag it too.

This is my Index file:


<DIV CLASS="BLOG">
<DIV CLASS="COLUMNHEAD">&nbsp; &nbsp; N A V I G A T I O N</DIV>

<DIV CLASS="LINKS" STYLE="WIDTH: 169px;">

<BR>
&nbsp; <a href="http://www.sultry-stare.net/shadowed/me.html" class="links">ME</a><BR>
&nbsp; &nbsp; &nbsp; YOU<BR>
&nbsp; &nbsp; &nbsp; BLOG ARCHIVE<BR>
&nbsp; &nbsp; &nbsp; FAN FICTION<BR>
&nbsp; &nbsp; &nbsp; POEMS<BR>
&nbsp; &nbsp; &nbsp; ABOUT DOMAIN<BR>
&nbsp; &nbsp; &nbsp; EXIT<BR>
<BR>

</DIV>
</DIV>

Can anyone tell me what I'm doing wrong? I just want to know a basic way of how she did her so I can tweak it from there. I would also love to know how she did the howl dotted link thing too. I think that looks real neat.

Any suggestions?

iTom
08-02-2005, 03:27 PM
She uses JavaScript, for your div, put this in: <div onmouseover="this.style.backgroundColor = '#CCCCCC';">Your text goes here. </div>

oldcrazylegs
08-02-2005, 09:12 PM
Read the MSDN section on Dynamic Styles for more information.

http://msdn.microsoft.com/library/default.asp?url=/workshop/author/dynstyle/styles.asp

amber2403
08-02-2005, 10:10 PM
Thanks for the help. I'm checking out the site right now and it looks like just what I needed. I think I can learn alot from this. You've both been a tremendous help! :)

amber2403
08-03-2005, 01:00 AM
Ok. I'm having a few problems. I took a look at the site. But I didn't really understand it, so I took a look at the source code of the example site, and it's looking like she said it all up through DIV Class or something of the sort.

The stuff I read seemed like you would implant it into the direct html and not css. am i missing something?

amber2403
08-03-2005, 09:57 AM
nevermind, i figured it out. just got a little tweaking to do now.