Need help positioning text

Discussion in 'Web Design and Development' started by davidwes, May 20, 2010.

  1. davidwes macrumors 6502

    Joined:
    Dec 28, 2004
    #1
    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.
     
  2. angelwatt Moderator emeritus

    angelwatt

    Joined:
    Aug 16, 2005
    Location:
    USA
    #2
    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.
     
  3. HomeBru Studios macrumors member

    HomeBru Studios

    Joined:
    Jun 4, 2008
    #3
    Your black "logo" is causing the characters to shift right.
     
  4. CMT macrumors regular

    CMT

    Joined:
    Aug 24, 2009
    #4
    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:
     

    Attached Files:

Share This Page