View Full Version : IE Problem - Div width not constraining?

12-07-2009, 01:11 AM
Having a strange issue in all versions of IE. (fine in Firefox)

Some of the divs aren't holding their width's... Please check out the site - any help would be great!

http://littletdesigns.com/work.html (http://littletdesigns.com/work.html)

#wrapper #work {
clear: left;
float: left;
width: 900px;
#wrapper #work #left {
width: 375px;
height: 215px;
clear: left;
float: left;
font-family: Arial, Helvetica, sans-serif;
color: #391D11;
font-size: 18px;
font-weight: bold;
line-height: 40px;
#wrapper #work #right {
clear: right;
float: left;
height: 215px;
width: 475px;
margin-left: 50px;

12-07-2009, 01:53 AM
Hello vraymer,
You have too many id's. The re-used id's should be classes. Check out the links about validation in my sig below.
Also look at http://www.tizag.com/cssT/cssid.php fo a very good explanation of the difference between id and class.

12-07-2009, 06:59 AM
Try adding the below code in your css:

img{ padding:0; margin:0;}


12-07-2009, 07:11 AM
I ran your page, http://littletdesigns.com/work.html , through the W3C validator...

You've got a few bugs. To start with, as Excavator says, you've got duplicated IDs on a page. (only one unique ID per page)

12-07-2009, 07:24 AM
Simply try doing the changes in your css

#navigation is having absolute positioning, change it to relative and delete margin-left. give margin-right:0px instead.

Use logo with banner image 'images/work-header.jpg' in background itself, and use transparent spacer instead in same div where logo is used to apply linking.

check floating of both logo's and navigation's div. It will work in all browsers.

12-07-2009, 08:49 PM
Thanks for the help!
I changed my divs to classes & that fixed my main problem.

(to Funny Ideas) I'm still having an issue with my logo & nav bar in older versions of IE - they are pushing out to the right hand side.

I tried making the nav relative, but it pushes my header down (contains a flash file on the home & images on the other pages). Also, I need the logo to position above my header so it can have an overlap effect.

I'm horrible with positioning so any clarification would be great!