Forum Moderators: not2easy

Message Too Old, No Replies

Different interpretation of 100% width

and other css layout questions

         

Guran

5:35 pm on Jan 12, 2004 (gmt 0)

10+ Year Member



I did a search on the forum and realised that 100% wide stuff is causing trouble for alot of people, but none of the posts I found answered my question.

I have a page. I plan on using a central 76% of the screen width. So I have a container div with this style; padding-left:12%; padding-right:12%; width: 76%;.

This renders fine in Opera and NS. IE however seems to interpret this differently. There I have to use width: 100%; for it to work the same way as in Opera and NS. Is there a solution for this?

My second question has to do with putting pictures in a div. The div is a container with a set background color. When I add a picture that is 150 pixels high in this container, I want the height of the div to follow. This works in Opera and IE but not in NS. Can anyone help me?

My third and final question is a problem with IE. Once again Opera and NS work fine on this point. I have added a picture to the container and set it to float left. I set the margin on the picture to 0px because I want the picture to be at the very left of the container. In opera and NS the picture is to the absolute left of the container, but in IE you see the edge of the container to the left of the picture. The margin property works in that way that I can move the picture further from the edge, but a margin of 0px is not where it should be. All help appreciated.

Guran

6:18 pm on Jan 12, 2004 (gmt 0)

10+ Year Member



The first issue has been solved.

DrDoc

6:56 pm on Jan 12, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Even though you solved the first issue, I'd still like to address it for future reference, and the benefit of anyone else that may have the same problem.

The solution is to either make sure IE6 renders in standards compliant mode or use Conditional Comments to serve IE a different value.

As for issue #2 -- is the image floated?

And, issue #3 sounds like the 3px jog bug...