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.
CSS Potitioing Help
Moderator: General Moderators
CSS Potitioing Help
- Attachments
-
- CSS TEST.zip
- (31.91 KiB) Downloaded 66 times
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: CSS Potitioing Help
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.
(#10850)
Re: CSS Potitioing Help
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.
- Attachments
-
- CSS TEST.rar
- (30.74 KiB) Downloaded 58 times
- Christopher
- Site Administrator
- Posts: 13596
- Joined: Wed Aug 25, 2004 7:54 pm
- Location: New York, NY, US
Re: CSS Potitioing Help
For a start just do:
I leave it to you to sort out the margins. I would recommend floating elements rather than absolute positioning.
Code: Select all
div#logo_1 {
float:left;
width: 230px;
}
#logo_2 {
float:left;
width: 230px;
}
(#10850)
Re: CSS Potitioing Help
That did it. I updated the file and validated my xhtml.arborint wrote:For a start just do:Code: Select all
div#logo_1 { float:left; width: 230px; } #logo_2 { float:left; width: 230px; }
- Attachments
-
- CSS TEST.rar
- (30.88 KiB) Downloaded 55 times