• 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.

    https://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

Viewing 5 replies - 1 through 5 (of 5 total)
  • 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.

    Thread Starter Corfian

    (@corfian)

    Thanks Worked a Treat ??

    Thread Starter Corfian

    (@corfian)

    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?

    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.

    Thread Starter Corfian

    (@corfian)

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Add padding without pushing content box out’ is closed to new replies.