...

View Full Version : hover on links stops working ...



blacktears
01-26-2006, 02:08 PM
I am trying to get the border around my image links to highlight white when the mouse rolls over it. This works fine in Firefox but then goes purple and blue in IE. I have fixed that problem but now I am finding that on both programs as soon as the link is clicked the hover doesn't turn white again. Is there anyway to fix this?


This is the CSS code:





body { background-color: #202A36;
margin: 10px;
color: #D4D4D4;
font-family: arial;
font-size: 9pt;
line-height: normal }
FONT { color : white; }


a:link {
color: #202A36;
text-decoration: none;
}

a:visited {
color: #202A36;
text-decoration:none;
}

a:hover {
color: #ffffff;
text-decoration: none;
}



a:link img {border-color:#202A36;}
a:hover img{border-color: #ffffff;}
a:visited img{border-color: #202A36;}



#wrap {
width: 550px;
}

#leeway {
top: 30px;
left: 0px;
margin: 0px;
position: absolute;
}

#whitelines {
top: 66px;
left: 490px;
width: 490px;
margin: 0px;
position: absolute;
}

#bottomline {
top: 512px;
left: 0px;
margin: 0px;
position: absolute;
}


#menu {
top: 30px;
left: 440px;
margin: 0px;
position: relative;
}


#designed {
top: 538px;
left: 18px;
margin: 0px;
position: absolute;
font-size: 7pt;
font-style: arial;
}

#rainstorm {
top: 531px;
left: 233px;
margin: 0px;
position: absolute;
}


#main {
top: 531px;
left: 74em;
position: absolute;
}

#border {
top: 90px;
left: 32px;
position: absolute;
}

#player {
top: 528px;
left: 550px;
position: absolute;
}

#para1 {
top: 190px;
left: 80px;
width: 200px;
height: 50px;
position: absolute;
}

#para2 {
top: 190px;
left: 350px;
width: 200px;
height: 50px;
position: absolute;
}

#lee {
top: 129px;
left: 600px;
width:200px;
height: 50px;
position: absolute;
}

p {
text-align: justify;
line-height: 1.1em;
width: 200px;
}


div#menu li{
display:inline;
}


#links {
top: 80px;
left: 400px;
position: relative;
}

#linktext {
top: 120px;
left: 530px;
width: 420px;
position: absolute;
font-size: 8pt;
}



ul { list-style-type: none }

_Aerospace_Eng_
01-26-2006, 02:19 PM
What does your html look like? Also why are you using the font tag? Its deprecated and shouldn't be used. Let me tell you right now your layout may look fine on your computer but if you view on a different resolution it might look off. This is because of your excessive use of absolute positioning.

blacktears
01-26-2006, 02:24 PM
Ok, so what else should I use instead of that? Also, I am having a hard time trying to find out how to do sites without this absolute positioning thing, an example of how I can do this one without it would be great! :)

html:


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

<html>

<head>

<link rel="stylesheet" type="text/css" href="style.css">


<meta name="author"
content="Becka Dawson" />
<meta http-equiv="content-type"
content="text/html; charset=uk-ansi" />

<title>Leeway - History.</title>

</head>

<body>
<div id="wrap">
<div id="leeway"><img src="images/leewayinverse.gif"></div>

<div id="whitelines"><img src="images/lineswhite.gif"></div>

<div id="bottomline"><img src="images/bottomline.gif"></div>

<div id="menu">
<ul>
<li><a href="history.html"><img src="images/history.gif"></a></li>
<li><a href="audio.html"><img src="images/audio.gif"></a></li>
<li><a href="images.html"><img src="images/images.gif"></a></li>
<li><a href="links.html"><img src="images/links.gif"></a></li>
<li><a href=mailto:shanghai_nobody@hotmail.com><img src="images/contact.gif"></a></li>


</ul>
</div>

<div><div id="designed">DESIGNED FOR IE : FIREFOX // B. DAWSON // </div>

<div><div id="rainstorm"><a href="http://www.rainstormphotography.co.uk"><img src="images/rainstorm.gif"></a></div>

<div id="main"><a href="main.html"><img src="images/main.gif"></a></div>

<div id="border"><img src="images/border.gif"></div>
<div id="player"><img src="images/player.gif"></div>

<div id="para1"><p>Leeway is a music project conceived by Lee Cross
to explore the emotional depth that music can create. He is working to make music that doesn't fit into specific genres
and explores certain situations through vocal and instrumental means. The representation of certain events in the form of music to allow the listener to associate it's feeling with their own situation in everyday life. The word Leeway means the margin of freedom or variation - Lee incorporates this into his music to avoid present constrictions within the business. He is always progressing and developing his style by gaining influ-</p></div>

<div id="para2"><p>-ences from different types of music to religion.
Music should not be made for profit alone, to express yourself within a creative way enables a snapshot of feeling and emotion to be documented without boundaries.
Most musicians have a certain genre and style, however to break the boundaries of ones own tendancies with creative exploration brings forth new and exciting developments.
Lee has always been involved in music, whether it be listening to it, singing or writing. It was a natural progression for him to write his own music after growing up with a variety of different styles and groups.</p></div>
<div id="lee"><img src="images/leepic.gif"></div>
</div>
</body>
</html>

ronaldb66
01-26-2006, 02:45 PM
Do observe the correct order for specifying the the pseudo-classes:

Link, Visited, Hover, Active (LoVe, HAte).

Here:
a:link img {border-color:#202A36;}
a:hover img{border-color: #ffffff;}
a:visited img{border-color: #202A36;}
the visited state will override later hover states.

_Aerospace_Eng_
01-26-2006, 03:31 PM
Post a link to your site. Obviously we don't have the images you are using.

blacktears
01-26-2006, 07:17 PM
Obviously it's not online yet or I would have done. I can give you a screenshot of it.

http://www.rainstormphotography.co.uk/screenshot.jpg

blacktears
01-26-2006, 07:18 PM
Thanks for the info didn't know there was a specific order but I do now thanks to the handy tip :D



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum