Help with CSS to remove left and right padding on page.

  • Author
    Posts
  • #103895

    dubdoug
    Member

    Hi,
    wonder if you can help with some CSS to make my page stretch to the full width equal to the length of menu above it ie have no left or right padding.

    My example page is here

    https://brandnewretro.ie/make-this-full-width-please/

    Thank you.

    The blog I need help with is brandnewretro.ie.

    #103998

    binarymoon
    Theme Author

    Hi there – happy to help with this. The css I am going to give you is specific to this actual page. I’m using the page id so that it doesn’t affect any of the other pages.

    .page-id-18026.singular .main { padding: 0; }
    .page-id-18026.singular .main article { max-width: 100%; }
    .page-id-18026.singular .main article section.entry { margin: 0; }

    If you want to use this on a different page then you should change the page id at the front of each line. If you want it to apply to all single pages then you can remove the bit referencing the page id entirely.

    #104008

    dubdoug
    Member

    Many thanks – that does the job. I appreciate your help and the quick reply.

    #104010

    dubdoug
    Member

    ooops! I spoke too soon. I still have an issue with it.

    The page https://brandnewretro.ie/make-this-full-width-please/ with the css applied has widened ok but not to the full width to match menu bar above ( as seen in this page https://brandnewretro.ie/category/adverts/)

    #104021

    binarymoon
    Theme Author

    Oh – The first line of css I gave you should have addressed this. I have just checked and it looks like something may have been copied into the css that isn’t valid css.

    There’s some text that says ‘make page full width’ right before the rule. This is breaking the css styles, so if you remove that it should work.

    #104022

    dubdoug
    Member

    Doh!! sorry, my mistake, sorted now. Thank you

The topic ‘Help with CSS to remove left and right padding on page.’ is closed to new replies.