2 replies [Last post]
ncpilgrim
ncpilgrim's picture
Offline
newbie
Last seen: 13 years 36 weeks ago
Joined: 2007-08-05
Posts: 10
Points: 0

Hi there,

I am trying to set up a small drop down menu in the top right hand corner of my page. My problem is getting the hover effect to fill the containing div. I have used advice found elsewhere on the Net to use display: block, but this just results in the 3 menus to appear stacked top to bottom. I have included what I believe to be relevant code.

Friend forever for some advice!

Thanks

Other stuff blah blah blah
Home Preferences Help

#appHeader
{
padding-bottom: 5px;
padding: 5px 5px 5px 0;
background-color: #99FFFF;
font-family: Arial, Helvetica, sans-serif;
margin-bottom: 15px;
font-size: small;

}

#appHeaderMenu
{
float: right;
display: inline;
}

#appHeaderMenu a
{
color:black;
text-decoration: none;
padding-left: 5px;
padding-right: 5px;
width: 100%;
height: 100%;

}

#appHeaderMenu a:hover
{
text-decoration:none;
background-color: #CDC9B4;

}

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 18 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

If you wish the links in a

If you wish the links in a horizontal line then you will need to float the anchors but you really need to construct a better structure for these links along the lines of a ul list I'm also not sure where the dropdown aspect comes into play , but that is usually achieved through a nested ul list.

Best thing is head over to 'listamatic' where you will find a large number of basic ul li menus that you can study and adjust to your tastes or have a look at 'son of suckerfish' for dropdown menu construction.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

ncpilgrim
ncpilgrim's picture
Offline
newbie
Last seen: 13 years 36 weeks ago
Joined: 2007-08-05
Posts: 10
Points: 0

Fixed

Thanks! The approach to structure my menus into lists and nested lists with uls and lis worked great. My thanks.