eerabbit Posted February 2, 2009 Share Posted February 2, 2009 Hi, I can't get my background to touch the edge of the windows. Can someone explain why?css: body {background: #000000;min-width: 940px;font: 12px georgia;color: #656565;align: center;}#all {align: left;}#banner {background: URL(images/head.jpg) no-repeat left center;border-right: 1px dotted #575757;width: 940px;height: 211px;float: left;z-index: 1;}#left {background: URL(images/headtop.jpg) repeat-x top left;height: 211px;width: 50%;padding-right: 470px;margin-left: 0px;margin-right: -940px;float: left;z-index: 2;}#right {background: URL(images/headbot.jpg) repeat-x bottom left;height: 211px;width: 50%;padding-left: 470px;margin-left: -941px;float: left;z-index: 3;} the site is here Link to comment Share on other sites More sharing options...
Enthusiastic Student Posted February 2, 2009 Share Posted February 2, 2009 Hi eerabbitTry * { margin: 0px; padding: 0px;}html, body { height: 100%; width: 100%;} Some browsers have default values for the margins on a page.Enthusiastic Link to comment Share on other sites More sharing options...
AARA Posted February 2, 2009 Share Posted February 2, 2009 Hi eerabbit !You Should Add This in Body at CSSBody{margin-top:0px;margin-left:0px;margin-right:0px;margin-bottom:0px;}* * Aara * * Link to comment Share on other sites More sharing options...
jeffman Posted February 2, 2009 Share Posted February 2, 2009 * { margin: 0px; padding: 0px; } This is a good idea. Just be aware that the * selector is universal, meaning it applies to everything. The different look may surprise you at first. List elements will look especially different. If you just want to adjust the body, put those definitions in your body, html selector.Also, everyone should be aware thatmargin: 0px;is shorthand for:margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px; Link to comment Share on other sites More sharing options...
eerabbit Posted February 2, 2009 Author Share Posted February 2, 2009 oh yay! thanks so much (: Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.