Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

davidwes

macrumors 6502
Original poster
Dec 28, 2004
307
141
Hi,

I have this basic layout I started to work on:

http://consultingcat.com/Untitled.html

Everything is how I want it, except that I can't figure out why the text in the content area "content blah blah blah" is starting so far into the box. What controls that?

Thanks for the advice.
 
I recommend using the Firebug extension for Firefox. It can help you debug these issues very quickly once you're use to it. In short though, the issue relates to using relative positioning and the "left" value you have.
 
If it still in time, here is the problem:

Code:
#wrappercontent {
	width:672px;
	padding:0px;
	border:5px solid gray;
	position:relative; /* Problem */
	left:192px;
	top:128px;
}

The wrapper is set to position relative, change that to absolute and you're done.

The explanation is simple: when you set it to relative and use a positioning property, the content stays on same position if it was in original place. Even though the div changed its position.

To understand better, try removing 'left:192px;' from the above code and reload the page. The result is that the black box pushes the content from that div:
 

Attachments

  • Screen shot 2010-05-24 at 15.08.18.png
    Screen shot 2010-05-24 at 15.08.18.png
    30.9 KB · Views: 86
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.