View Full Version : Attempting to move 2 page layouts to one CSS stylesheet

04-10-2009, 05:46 AM
I've been reading Mastering CSS with Dreamweaver CS3 by Stephanie Sullivan and I learned how to migrate embedded CSS code into an external stylesheet.

I am attempting to merge the codes from a .twoColFixLtHdr layout with a .oneColFixCtrHdr layout. I ran into one problem. The body tags have unique properties and values in each layout. I attempted to add a class of ".oneColFixCtrHdr body" to one layout and the webpage lost its formatting immediately.

Is it possible to have two body tags in one CSS stylesheet?
THis is my second post on unrelated issues.....Help!

04-10-2009, 06:02 AM
no it will cause a conflict if you make them classes .twoColFixLtHdr and .oneColFixCtrHdr
call them by either <body class=".oneColFixCtrHdr"> or the other where required

04-10-2009, 06:24 AM
How will I identify which one belongs to which layout in the stylesheet?

04-10-2009, 06:31 AM
<body> is the tag so if you have in page 1<body class=".oneColFixCtrHdr"> and in page2 <body class=".twoColFixCtrHdr">
they will use them. i may have over simplified this noyt seeing all the style sheet but the principal is sound. always make a back up copy you can use if you make a mistake so you can return to a starting point

04-12-2009, 05:05 PM
If the class name is 'oneColFixCtrHdr' then you're not supposed to use the period character in the class attribute on the body tag.

<body class="oneColFixCtrHdr">