View Full Version : Unwanted spacing between divs in IE

08-11-2005, 07:22 AM
Hi guys,

I have a website that I created using tables *smacks hand*... http://www.opscentre.co.nz

I've now got some spare time and i'm going back through trying to recreate the site using css. At the moment i'm working on the menu down the left hand side of the page (http://www.opscentre.co.nz/test.html). When viewing this page in firefox, opera and netscape, the menu seems fine. However, in IE 6 & IE 5, a 5px or so gap appears between the top div of the menu & the second div. I'm not sure what is creating this...is it some sort of bug? Can someone please help me out here? would be great if you could...

Here's the html:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<title>.: OpsCentre :.</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="css/testcss.css" rel="stylesheet" type="text/css" />

<div id="container">
<div class="topbar"></div>
<div id="banner"></div>
<div class="topbar"><span class="topbar">The Home of Software Solutions for the Passenger Transport Industry</span></div>
<div id="bodybg">
<div id="menu">
<div id="top"></div>
<div class="leftmenu"><a href="index.html" class="leftmenu2">Home</a></div>
<div class="leftmenu"><a href="products.html" class="leftmenu1">Products</a></div>
<div class="leftmenu"><a href="packages.html" class="leftmenu1">Packages</a></div>
<div class="leftmenu"><a href="upcoming.html" class="leftmenu1">Upcoming Releases</a></div>
<div class="botbar">
<div class="floatleft"><a class="bottom" href="contact.html?name=4">Click here to contact the webmaster</a></div>
<div class="floatright"><span class="topbar">Copyright 2005, Transport Management Systems Ltd. (NZ)</span></div>

Attatched is the css for this page...

08-11-2005, 07:40 AM
You should be using an ordered or unordered list for your menu, not a div for each link. Check out this site (http://www.stunicholls.myby.co.uk/menus/index.html) for some ideas.

08-11-2005, 07:48 AM
How come? whats the negative to 1 div per link??

08-11-2005, 01:18 PM
Semantic use of code. And users with text browsers get a nice list with bullets.