Page 1 of 1

CSS Potitioing Help

Posted: Mon Jan 21, 2008 5:48 pm
by cupaball
Hi All:

I am trying to learn CSS and have created a mock up site to learn positioning. The layout looks fine in FIreFox but is off by few pixels in IE7. Can someone look at the files and tell me what I am doing wrong. Maybe I used the wrong positioning technique.

Hope you can help.

Re: CSS Potitioing Help

Posted: Mon Jan 21, 2008 6:14 pm
by Christopher
Typically the problem is the problems with IE's box model. The solution is to not use padding and margins together. Wrap and extra <div> around the problem area and put the margin in it.

Re: CSS Potitioing Help

Posted: Tue Jan 22, 2008 6:16 pm
by cupaball
I think I still may be doing something wrong. Can some take a look for me? I added another div, but it still looks the same. I attached an updated file.

Re: CSS Potitioing Help

Posted: Tue Jan 22, 2008 7:07 pm
by Christopher
For a start just do:

Code: Select all

div#logo_1 {
float:left;
width: 230px;
}
 
#logo_2 {
float:left;
width: 230px;
}
 
I leave it to you to sort out the margins. I would recommend floating elements rather than absolute positioning.

Re: CSS Potitioing Help

Posted: Thu Jan 24, 2008 5:17 pm
by cupaball
arborint wrote:For a start just do:

Code: Select all

div#logo_1 {
float:left;
width: 230px;
}
 
#logo_2 {
float:left;
width: 230px;
}
 
That did it. I updated the file and validated my xhtml.