Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem tailoring CSS image rollover menu in UL 1

Status
Not open for further replies.

TobyA

MIS
Nov 7, 2002
164
GB
Dear Web Gurus,
I am using a CSS image rollover in conjuction with a UL here:-


Originally I got the CSS from here:-


However I've had to hack it to work in a vertical menu. As you can see it's not quite right - For some reason there is a margin to the left of the button which I don't want that in turn is cutting off the button so you cannot see the right hand edge of the image.

Any suggestions would be greatly appreciated.

Cheers,
Toby

PS - I posted this message in a reply to a previous thred but didn't receive any response so I am posting again.
 
Your problem has to do with the default padding and/or margin applied to the ul element. If you look at the ul element by default, the text is moved inside a little bit. This is achieved either by padding or margin or combination of both in various browsers. In your code, your ul is kept at the default styling of the browser and so that gap exists and plays a part in your button not showing up correctly. In your css, make sure you define 0 padding and margin to the ul element. Best would be like so:
Code:
#nav ul {
  padding: 0;
  margin: 0;
}
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top