W3C home > Mailing lists > Public > www-style@w3.org > February 2008

Overflow and Margins

From: Brad Kemper <brkemper@comcast.net>
Date: Sat, 2 Feb 2008 11:44:06 -0800
Message-Id: <031FBB8A-968C-4E16-8988-62EF395E45ED@comcast.net>
To: CSS Style <www-style@w3.org>

Isn't it a bit odd that of one block is wider than its parent, and  
the parent is set to "overflow:scroll", that the margins of the child  
are shown on the top, bottom, and left, but not on the right? Is that  
the way it is supposed to be? It seems to me that the right margin  
should also be shown within the scroll box. (Tested in FireFox 3 and  
Safari 3.)

Example:

<html>
	<head>
		<style type="text/css">
			DIV { border:1px solid; overflow-x:scroll; }
			DIV DIV { height:5em; margin:.5em; width:200%;}
		</style>
	</head>
	<body>
		<div>
				<div></div>
		</div>
	</body>
</html>
Received on Saturday, 2 February 2008 19:44:32 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 27 April 2009 13:55:01 GMT