Need help? Check out our Support site, then


restrict sidebar only to home page

  1. Hi!

    My sidebar keeps showing on every page,I want to restrict it only to my home page,how can I do that?

    The blog I need help with is letstrycreating.com.

  2. This thread will be moved to the CSS Forum for you. Please do not create a duplicate thread.

  3. ok thank you!

  4. One way would be to hide it everywhere and then unhide it using the ".home" body class selector.

    Here is a basic example:

    #secondary {
    	display: none;
    }
    
    .home #secondary {
    	display: block;
    }

    Try coming up with the CSS you would need to adjust the width of the main content column with a similar set of code.

    To learn more about CSS, start here!
    http://www.htmldog.com/guides/cssbeginner/

  5. Thank you! by width of main content column which area do you exactly mean? as I am discovering the right design for my website and CSS commands both at the same time and same pace !!!

  6. You're doing great!

    by width of main content column which area do you exactly mean?

    Check out this example. It shows the web inspector in the Chrome browser. To find it, I right-clicked on the main content area on the http://letstrycreating.com/tutorials/ page then I looked in the HTML panel on the left until I found the container for the content. When you click on the container HTML element on the left, you will see all of the CSS that applies to the element you clicked on in the right panel. So, in this example, you can see how the theme has used the ".content-area" selector and set the width to 42.7451%

    http://cl.ly/QC1L

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags