Forum Moderators: not2easy

Message Too Old, No Replies

2 content div for same style sheet?

Different specs for certain pages

         

renvac

7:47 pm on Mar 5, 2004 (gmt 0)

10+ Year Member



Hi - all these posts are really helpful - thanks again. WhatI want to know is:
My style sheet is: top, leftnav,content and right nav

Some pages I want: top, leftnav and content (no right nav) but I want my contents to be closer to the right side on this one(so basically it has the same specs except for the right side)

Content 1
div#content { etc
div#content div.specs { etc
div#content h1 { etc

Other Content
div#contentother { etc
div#contentother div.special { etc
div#contentother h1 { etc

html:
<div id="content">
<div class="specs"><h1> dah dah dah</h1></div></div>

html:
<div id="contentother">
<div class="special"><h1>dah dah dah</h1> </div></div>

Would this be the right way of doing this? Or is there a better way? I did try it this way and it seems to work but I cant get the font sizes to work correctly on second div#contentother.
Or should I make a separate style sheet for the pages I want the content spreading more to the right and no rightnav?
Thanks alot for any help -
RenVac

iamlost

8:30 pm on Mar 5, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Yes and no ;-)

If the additions make your css file too large you are wasting bandwidth. In that case separate css files for each type of page is best.

My rule of thumb where the css file covers many different possibilities is that once "unused" css rules hit 1kb I generate a separate css file.

Generally it is cleaner to have separate css files. Also, if you are generating pages dynamically (i.e. php) it is common to have separate and even multiple versions of header/nav/content css files that keep bandwidth low and customization high.

renvac

1:09 am on Mar 6, 2004 (gmt 0)

10+ Year Member



Iamlost - Thanks again - I will do a separate style sheet for the pages that I want in the different format. As far as php - havent gotten that far yet - still learning CSS!
RenVac