Log in

View Full Version : Need help!



Gangster
03-08-2008, 05:55 PM
I have 2 problems

1 I want it to be so when you hover over an image, it changes into a diferent one. Here's my CSS.

#HabboPop {
background: url(images/navbuttons/HabboPop1.PNG);
height:27px;
width:209px;
}
#HabboPop:hover
{
background: url(images/navbuttons/HabboPop2.PNG);
height:27px;
width:209px;
}

and my html

<div id="HabboPop"></div>

But when i hover over it, it still stays the same

2 For some reason, even though i made a cotainer, the other boxes still go down. Because the top content bar, is set to be -???px. because if it was at zero, it would go below the div previously placed.

HTML

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<style type="text/css">
<!--

#container {
width: 229px;
}

#nav1 {
background-image: url(images/blue-box1.PNG);
width: 217px;
height: 24px;
margin-left: 32px;
padding-left: 12px;
padding-top: 8px;
font-family: Tahoma;
font-size:11px;
color:#FFFFFF;
}

#nav2 {
background-image: url(images/box-mid.PNG);
width: 209px;
margin-left: 32px;
padding-right: 10px;
padding-left: 10px;
padding-top: 4px;
font-family: Verdana;
font-size:11px;
color:#919191;
}

#nav3 {
background-image: url(images/blue-box2.PNG);
width: 229px;
height: 10px;
margin-left: 32px;
}
-->

</style>
</head>

<body>

<div id="container">
<div id="nav1"><b>Navigator</b></div>
<div id="nav2">
<div id="HabboPop"></div>
</div>
<div id="nav3"></div>

</body>
</html>

Preview

http://www.tehupload.com/uploads/2913720945bfde2problem.PNG

L?KE
05-08-2008, 06:53 PM
Not sure entirely if this would work, as it's off the top of my head, but you could just go ahead and use the images:



<img src='images/navbuttons/HabboPop1.PNG' width='209' height='27' alt='HabboPop' onmouseover='this.src="images/navbuttons/HabboPop2.PNG"' />

Redacted
05-08-2008, 07:13 PM
take out the <title> move it up more, and the DBG code is too low

wsg14
05-08-2008, 10:12 PM
#habbopop {
background-image: url(images/navbuttons/HabboPop1.PNG);
height: 27px;
width: 209px;
}
#habbopop:hover
{
background-image: url(images/navbuttons/HabboPop2.PNG);
height: 27px;
width: 209px;
}


I don't see anything wrong with the code, the one above may work though.

As for your other problem, I really don't understand what you're trying to say.

Gangster
09-08-2008, 10:36 AM
I fixed problem one, but problem 2 i still cant figure out why.

Want to hide these adverts? Register an account for free!