PDA

View Full Version : Drop Down Menu - Can't Work Out Where Indentation is Coming From



durdledoor
Mar 9th, 2007, 02:25 PM
Afternoon All

I have a problem with some Java Script Coding. Its actually from my company's Intranet, but I've uploaded the images to a page which you all can see.

On the following page I have a drop down menu from the nav bar items (except the first one)

http://www.ja.net/temp/drop-down3.html

The problem is, for some reason an indentation has been added, and both by looking at the coding and removing the css file I haven't been able to remove it. Would anybody be able to work out why its happening?

Thanks very much
Durdledoor

phoenixshade
Mar 9th, 2007, 08:40 PM
Add this to your CSS:

.menu ul {
margin:0;
padding:0;
}
This will override browser defaults on the <ul>.

Also, you probably shouldn't be using a <dl> for the top level. Instead, you should use a <ul> for the top level, then nest <ul>s inside of the top-level <li>s for the drop-downs.

Lastly, I have to mouse up into the header area make the dropdowns disappear. (Checked IE7 and FF2 under WinXP.) Makes it kind of awkward to mouse over the bottom items of the top-level menu. Setting a width for the menu's container should take care of this.

durdledoor
Mar 14th, 2007, 09:55 AM
Thanks very much for posting this Phoenix Shade

Sorry for the delay in thanking you, I've been out of the office for the last 2 days.

I'll try this coding today, and get back to you if I have any problems.

Thanks again

Daniel