PDA

View Full Version : CSS sheets


Scarface02
10-03-2010, 04:30 AM
I have a template im using and it has an external style sheet that controls each page, the problem is i want to adjust margins/paddings on a certain page but when i do it, it effects every page. how can i get it to where it only effects that one page?

edbr
10-03-2010, 06:51 AM
use a specific class for that element

Scarface02
10-04-2010, 03:54 AM
when i try to make a new css rule and do a class rule and change the margins, it still changes my external css sheet and changes everypage. how can i get it to where it only effects that one page :/

edbr
10-04-2010, 03:56 AM
as i said make a specific class and apply it to that page element

ex .white{color:#000:}

on your page <p class="white">

Corrosive
10-04-2010, 07:04 AM
.white{color:#000:}



Have you used the hex for black just to be confusing? ;)

edbr
10-04-2010, 07:05 AM
yes, its monday and im not a happy camper today

DWcourse
10-04-2010, 08:44 PM
In your Dreamweaver template add an Editable Attribute (menu: Modify>Template>Make Attribute Editable…) "ID" to the body tag. This will allow you to set an ID for any individual page. So if you give your page the ID "special" you can target only that page by adding #special to the front of a style rule.

For example, #special p would affect only paragraphs on the special page.

Note: Instead of the ID attribute you can add a CLASS editable attribute to the body tag if you will need to make the change on more than one page.