WordPress.org

Ready to get started?Download WordPress

Forums

Need to customize a page (3 posts)

  1. SMG
    Member
    Posted 8 years ago #

    Hi all,

    I'm looking to create a customized page(not Post). I have removed the side bar for just this page by modifying some code in page.php. This works fine. I now want to make the body wider to fill out the space left by the missing sidebar. The problem is that the css has the content set to 610 pixels. However, the main space is 850 pixels. Is there any way for me to override the css just for this page? I need to set the content for this page to 850 pixels.

    Thanks for any advice

  2. cam_oai
    Member
    Posted 8 years ago #

    use a new css file maybe? giv the page.php a header and insert css link to new css file. uggly but it should work :)

  3. Ming
    Member
    Posted 8 years ago #

    You need to add a unique element to target that div specifically. So if you have <div id="content"> you could copy the #content property and rename it #contentwide and then use that ID on your custom page.

    Another way is to add an unique tag to your <body> element. Like <body id="custom"> and then you can add a rule like #custom #content { width: 850px; }. That'll change the content width only for <body id="custom"> pages.

Topic Closed

This topic has been closed to new replies.

About this Topic