Forums

F2 theme / Centering page (3 posts)

  1. dleonte
    Member
    Posted 3 years ago #

    I have added a width: 1040px; for the body dimension of my page in the style sheet. When I did so the entire body (container) shifted to the left.

    Where do I specify that I want the body (container)centered on the page?

    http://mysite.juliefarha.com/

    Thanks so much for taking the time to help.

    Diane

  2. Samuel B
    moderator
    Posted 3 years ago #

    right below where you defined the 1040px - add this

    margin:0 0 0 70px;
     position:relative;
  3. dleonte
    Member
    Posted 3 years ago #

    Thanks Samboll, that worked.

    Can you explain what position; relative; means?

    Is the margin;0 0 0 70px; referring to the margins outside the top, right, bottom and left of body?

    If so, how did you know 70px on the left margin would be the number needed to center the body?

    Do I need the margin:0; anymore?

    body {
    margin:0;
    padding:20px;
    background:#888;
    color:#444;
    width:1040px;
    margin:0 0 0 70px;
    position:relative;

    With much appreciation.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags