SitePoint Sponsor

User Tag List

Results 1 to 9 of 9

Thread: Left margin

Hybrid View

  1. #1
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Left margin

    Hi, I've created a new page on my site.

    The text is right up against the left hand side how do I get the
    text over a bit <center> has not worked. http://www.see360degrees.com.au/testimonals.html
    Thanks.

  2. #2
    SitePoint Mentor bronze trophy
    John_Betong's Avatar
    Join Date
    Aug 2005
    Location
    City of Angels
    Posts
    1,819
    Mentioned
    73 Post(s)
    Tagged
    6 Thread(s)
    Try either or both margin-left: 1em or padding-left: 1em

  3. #3
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Presumably you want your content centered just like the content in the header section. Presuming you are going to have a sidebar too, I would suggest that you wrap your .content_630 div in a wrapper:

    Code:
    <div class="content">
      <div class="content_630">
      </div>
    </content>
    and then style it like so:

    Code:
    .content {
      margin: 0 auto;
      width: 960px;
      overflow: hidden;
    }

  4. #4
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by ralph.m View Post
    Presumably you want your content centered just like the content in the header section. Presuming you are going to have a sidebar too, I would suggest that you wrap your .content_630 div in a wrapper:

    Code:
    <div class="content">
      <div class="content_630">
      </div>
    </content>
    and then style it like so:

    Code:
    .content {
      margin: 0 auto;
      width: 960px;
      overflow: hidden;
    }
    Will do! Thanks

  5. #5
    SitePoint Enthusiast
    Join Date
    Nov 2011
    Posts
    78
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Barry360 View Post
    Will do! Thanks
    I must be doing something wrong, I placed the code is the css file and altered the code on the page it won't move?

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,165
    Mentioned
    453 Post(s)
    Tagged
    8 Thread(s)
    Quote Originally Posted by Barry360 View Post
    I placed the code is the css file
    It's not online yet. Maybe you forgot to update the CSS file.

  7. #7
    SitePoint Member
    Join Date
    Feb 2013
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The easiest way is to use float: left and then give a margin up to your requirement in your CSS file.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •