Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Show rightside bar on some categories via CSS

Quote Reply
Show rightside bar on some categories via CSS
I am trying to display rightside bar on some categories/subcategories via luna css.
I have serveral copies of category.html, so I tried this approach with one copy of category.html (category33.html) but had no effect:

Code:

/* show the right sidebar for this category33 template only*/
#category33 ocwrapper {
border-right-width: 200px;
}
#rightsidebar {
display: block;
}
#contentheader .error, #contentheader .message {
margin: 0px;
}


thank you
Mark

Last edited by:

Mark2: Oct 9, 2006, 10:12 PM
Quote Reply
Re: [Mark2] Show rightside bar on some categories via CSS In reply to
Try using an <if category = ...> statement in the head section of your category template to import an extra stylesheet file containing your custom CSS. You could also use an <if> statement in the include_rightsidebar.html template to include the HTML code of the sidebar itself.

You could use your method above but you would need to append the category id to the <body> tag in the page e.g. <body id="category<%ID%>">, or some other custom identifier.
Quote Reply
Re: [aus_dave] Show rightside bar on some categories via CSS In reply to
Well! I thought you can target a specific template from the luna.css by specifing the template id...
I put the id in the body for the copied categories as: id="category<%ID>" which now shows id=category33 in the source. Can not I target this from the same css file. It worked for the h2 tag but not for the right and left sidebars.
If this is not the case.. then what is the right code...
thanks
Mark
Quote Reply
Re: [Mark2] Show rightside bar on some categories via CSS In reply to
It should be #category33 #contentwrapper in your CSS above.

Use #category33 in front of every style you want to override and that should work.

Last edited by:

aus_dave: Oct 10, 2006, 4:36 PM
Quote Reply
Re: [aus_dave] Show rightside bar on some categories via CSS In reply to
Way to go Dave!!!! that was the answer (the missing #) .... thanks very much ...
Mark
Quote Reply
Re: [Mark2] Show rightside bar on some categories via CSS In reply to
No worries Wink.

The Links CSS-driven templates are a great system - makes it very easy to customise a site.