2 Replies - 417 Views - Last Post: 31 July 2009 - 01:28 PM

#1 Gamegoofs2  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 159
  • Joined: 15-April 09

Hover problem

Posted 31 July 2009 - 11:33 AM

Ok I postioned everything in a seperate html doc with style, then when I put it into the layout it doesn't work right. The bars the come when you hover over the link don't do all the way across the button. It did when I made the seperate html doc. Anyone have any ideas how to fix it?

Here's the seperate html doc that it worked in.
<html>
<header>
<style type="text/css">
#menulinks a {
font-size:31px;
padding-left:25px;
}
#menulinks a:hover {
background-image:url(images/menuhover.png);
width:100%;
}
#menulinks {
width:160px;
background-image:url(images/menu.png);
}
</style>
<body>
<div id="menulinks">
<a href="index.html">Home</a>
<a href="about.html">About</a>
<a href="contact.html">Contact</a>
<a href="meeting.html">Meeting</a>
</div>
</body>
</html>



Here's the links in the full layout:
  <div id="menulinks">
<a href="index.html">Home</a>
<a href="about.html">About</a>
<a href="contact.html">Contact</a>
  </div>



And here's the CSS code for the menu:
#menulinks a {
font-size:30px;
padding-left:35px;
}
#menulinks a:hover {
background-image:url(images/menuhover.png);
width:100%;
}
#menulinks {
width:160px;
background-image:url(images/menu.png);
margin-left:30px;
}


Here's page http://silverfishdes...xofire.net/web2

Is This A Good Question/Topic? 0
  • +

Replies To: Hover problem

#2 przemass  Icon User is offline

  • D.I.C Head

Reputation: 30
  • View blog
  • Posts: 166
  • Joined: 18-July 09

Re: Hover problem

Posted 31 July 2009 - 01:17 PM

Try this
#menulinks a:hover {
background-image:url(images/menuhover.png);
width:125px;
}
#menulinks a {
font-size:30px;
padding-left:35px;
display:block;
}


You are doing it wrong, each link should have own background, not one background to all menu like in #menulinks. To create menus use <ul>, <li> tags, not div's.
Was This Post Helpful? 0
  • +
  • -

#3 Gamegoofs2  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 159
  • Joined: 15-April 09

Re: Hover problem

Posted 31 July 2009 - 01:28 PM

Ok thanks I'll try that!
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1