tags:

views:

308

answers:

3

I have my Drupal theme set up with a notebook spine image in the middle, giving it a 50/50 page split.

The problem is, on a few pages, I want to get rid of that notebook spine and use the whole page. I have looked around on Drupal.org, but no luck.

Would this be an edit to the page.tpl or style.css?

Thanks,

Tim

+1  A: 

Add an id to your body tag on the page where you don't want the spine and add a second CSS rule for it like this:

The HTML:

<body id="nospine">
   <div id="page"><!-- your content here --></div>

The CSS:

#page {
   background:#fff url(spine.gif) top repeat-y; /* normally with spine */
}
#nospine #page {
   background:#fff; /* without the spine image */
}

All pages will now display the spine image unless you add the 'nospine' id to the body tag, easy!

Matthew James Taylor
Hey Matthew, Thanks! :) I am new to Drupal, and this is where I get lost. In a typical website, there would be a physical page in a directory. In Drupal it is all rendered through templates and themes, so in what file can I indicate the specific URL's that I want to exclude the CSS element from?
A: 

I have a forum and I would like to remove the right hand bar which is currently styled in my css as an image.

I hope you can help. I have tried your advice above as I have a right hand rail bar on my forum that I wish to remove (my site is currently in development) it is a body tag as follows:

body {
    width: 100%;
    overflow: hidden;
    background: url(images/bgr_body.gif) repeat-y right;/* normally with body */

I have included this but of code in the main css file as you advised in the post above:-

}
#nobody #page {
   background:#fff; /* without the body image */
}

In my tpl file (for this specific page) I have put in the following:

<head>
    <body id="nospine">
   <div id="page">
<?php print $head; ?>
    <title><?php print $head_title; ?></title>

It does not seem to be working any idea where I am going wrong? Thanks in advance for your help. I also like the editor you have on this forum can you tell me which one it is. Thanks so much for your help in advance.

Aunty Flo
A: 

Ok, found your great site again when trying to search for another CSS problem that I am having. Does anyone know how I can assign a drupal page with zero css apart from the header. I have tried to delete print $style in the main tpl page - but that does not work. Thanks stackoverflow guys - great website. Great if Matthew could answer this one :-)

Dreamer - Aunty flo again