By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,199 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

Why does border affect margin in centered fixed width div in NS7.1?

P: n/a


The desired effect is a fixed width left margin with a fixed width div
centered in the right side. If the browser is resized to become very
narrow (less than 640px in this example), the right side centered div
should stop at the margin and horizontal scroll bar appear as the
window gets extremely narrow.
IE6 and Opera 4.11 display all the examples the same way.
The top row is a table and behaves the same in all browsers I have
tested. The next row shows the difference, if you view it in IE6 and
NS 7.1. The third row shows that NS7.1 displays "correctly" if the
centered div has a border. The fourth is just a test to see if setting
the background and not the border would affect the issue.
Netscape ignores the margin of the parent, unless there is a border
around the centered, fixed width div.
Perhaps I am misinterpreting what is happening, but that is what I am
Can anyone help me undstand this behavior?
Thanks in advance for any enlightenment on this issue.

Jul 20 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.