Previous Message
Next Message

URL Backgrounds and Padding 0px

Sent by Gunlaug_Sørtun on 9 April 2008 03:03


Alan Gutierrez wrote:

> http://blogometer.com/repository/css/background-border/index.html

You're running into "collapsing margins"[1], where the default vertical
margins - on the paragraph in your case - is escaping its divs (#content
& #container), ending up creating a gap between the divs (#container &
#photo).

Vertical paddings on those container-divs will "separate margins" and
prevent that, so something as simple as...
div {padding: 1px 0;}
....will make it appear alright.
Many other properties/values that will "contain margins", are listed in
the spec[1]. You can of course also zero out the margins on paragraphs
and add paddings to them instead - if that suits your design.

regards
	Georg

[1]http://www.w3.org/TR/CSS21/box.html#collapsing-margins
-- 
http://www.gunlaug.no
______________________________________________________________________
css-discuss [EMAIL-REMOVED]]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
Previous Message
Next Message

Message thread:

Possibly related: