Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Wordpress - CSS Layout Query

  • 16-01-2013 4:14pm
    #1
    Registered Users, Registered Users 2 Posts: 15


    Hi,
    Can someone help me to put a margin to the side of the text on this website page? Dennany Reidy Associates - Engineers

    I can't figure it out as I am not too familiar with wordpress & css templates - code.

    Thanks


Comments

  • Moderators, Technology & Internet Moderators Posts: 11,017 Mod ✭✭✭✭yoyo


    Wrap a new div around the content page.php such as:
    <div id="content">All the content fetching scripts...</div>
    
    (if you use posts do the same in archive.php)
    Then make a new CSS entry:
    #content{
       margin: 0 20px 0 20px; /* 20px margin L&R */
    }
    

    Hope this helps

    Nick

    Edit: Why do you have two container divs? only have one, maybe called the one with the content content instead


  • Registered Users, Registered Users 2 Posts: 15 koaj


    YoYo,
    Many thanks for the quick & detailed response. I must admit that I didn't design the website, but am trying to make some changes to it. I will look into the 2 container divs and try your suggestions.

    Many thanks.


  • Moderators, Technology & Internet Moderators Posts: 11,017 Mod ✭✭✭✭yoyo


    koaj wrote: »
    YoYo,
    Many thanks for the quick & detailed response. I must admit that I didn't design the website, but am trying to make some changes to it. I will look into the 2 container divs and try your suggestions.

    Many thanks.

    Try not to have multiple divs with the same name if you can. I should have pointed out it is not actually incorrect coding but it is certainly bad practice. Also loose the Flash header design for something JavaScript based. That is one thing your Apple Mobile visitors (and newer Android machines) won't see alone. A pretty standard CSS structure would be:
    |Container
    -| Navbar
    -| Content
    -| Footer

    Of course this is quite broad, and you will likely have other divs, widget area, breadcrumbs etc. but it shows your container should contain all other divs inside of it. Calling everything the same name just makes trying to work out the actual container from other wrappers and what not a right pita..
    My suggestion should work anyways.
    The reason I said to make a new "content wrapper" layer for the content is that if you margin the div the main container is in, all the items (menu, header image) inside that div will get margined also, negating the purpose if that makes sense.

    Nick


Advertisement