• HI! New to WordPress, and am a non-programmer.

    My site is http://techno-french.com.

    I want to create a page with no sidebar, which is easily just a checkbox away, but what I also want is to increase the width of the remaining CONTENT DIV so that I can load it up with an image or video gallery.

    Is there a way to do this? I can’t do it with CSS, because if I change the width of #CONTENT, it’s also changed for my Posts page.

    Any ideas?

    Barry

Viewing 4 replies - 1 through 4 (of 4 total)
  • You can target CSS to specific pages by using the page-specific class in the CSS selector – i.e. for your “sample page” the body tag HTML shows:

    <body class="page page-id-2 page-template-default custom-background">

    So the CSS for that page only would be:

    body.page-id-2 ...other selectors as needed {
       styles;
    }

    Thread Starter barryglick

    (@barryglick)

    Fabulous! Thanks!

    Barry

    Thread Starter barryglick

    (@barryglick)

    Oh, one more question. Do you mean I target this long class,

    “page page-id-2 page-template-default custom-background”

    with my CSS?

    Barry

    No, actually each of those is a separate class (hyphenated words makes it one word = one class), so you can use any of those for various purposes. So the “page-id-2” would get just that page. If you used “page-template-default” that would get all pages using that template…

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Want different #content width for pages’ is closed to new replies.