WordPress.org

Forums

Twenty Eleven
Add padding without pushing content box out (6 posts)

  1. Corfian
    Member
    Posted 1 year ago #

    Hello I am new at WordPress.
    I am trying to add some padding left and right to the text of my content so that it doesn't touch the edge. but every time i add some (padding-left or padding-right) the content box expands and touches the side bar.

    http://www.corfugreecetours.com

    i set the width of the content and side bar with:
    #primary {
    float: left;
    margin: 0 -26.8% 0 0;
    width: 100%;
    }
    #content {
    margin: 15px 34% 15px 1.9%;
    width: 69.4%;
    }
    #secondary {
    float: right;
    margin-right: 1.9%;
    width: 24.9%;
    }

    Any help will be appreciated

  2. dazzyweb
    Member
    Posted 1 year ago #

    If I understand correctly you want some spacing on the left of your text.

    Try something like the following:

    .entry-content, .entry-summary {
    padding: 1.625em;
    }

    This will give you padding top right bottom and left

    At the moment your padding is only set to top and bottom.

    Best to add this to your custom css or a child theme.

    Hope this helps.

  3. Corfian
    Member
    Posted 1 year ago #

    Thanks Worked a Treat :-)

  4. Corfian
    Member
    Posted 1 year ago #

    One thing i noticed is that if the content contains a full line of text(or images) then the site expands slightly(width wise). e.g the page 'tours' is narrower than the other pages as it hasn't got a full line of text. if I remove the text of the other pages then they will become narrower slightly and if i add text to the page tours then that will expand slightly too.

    The code you gave isn't causing this as I tested it so it was happening before but only noticed it now. would you know the reason why this is happening?

  5. dazzyweb
    Member
    Posted 1 year ago #

    Hi Corfian

    I can't seem to see a difference on those pages.

    Looking at it I think that maybe you are being deceived by the scroll bar on the right hand side of the browser.

    When you have no or little content the scroll bar is not there. When the scroll bar is there then it moves the content over to the left. This might be giving the perception that the page is narrower.

    Have another look and let me know.

  6. Corfian
    Member
    Posted 1 year ago #

    Oh yes it is the scroll bar moving the content. oops :-s . Thank you very much for the help :-)

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic

Tags

No tags yet.