logo-dw

Go Back   Dreamweaver Club Forums > Hand Coders Forum > HTML and CSS
Register FAQ Members List Search Today's Posts Mark Forums Read

Reply
 
Thread Tools Display Modes
Old 03-06-2008, 09:45 PM   #1
RyRiggsy
 
Join Date: Mar 2008
Posts: 2
Default Basic CSS Question

Hello, brand new to all of this so please bear with me...I am trying to edit/format two different pages in Dreamweaver. Whenever I make a change to something like the "line height" for instance, it changes the line height in the other page and completely throws all off all of my text. I guess I am wondering how to just format one page separately from others, without CSS applying those changes to all pages. Any help would be greatly appreciated. Thanks!
RyRiggsy is offline   Reply With Quote
Old 03-07-2008, 05:49 AM   #2
tux
tux's Avatar
 
Join Date: Feb 2007
Location: Isle of Wight, that little island right at the bottom of the UK
Posts: 657
Default

Hello RyRiggsy and welcome to the forums.

When asking a question it is always best to post your code and/or a link to your webpage if possible. That way it is easier for members to help.

Quote:
I guess I am wondering how to just format one page separately from others, without CSS applying those changes to all pages.
I'm still learning CSS myself but your will have to apply a different class to the two different items in your page. Some thing like this.....

Code:
<div class="item1">
and on the other page....

Code:
<div class="item2">
I've used the div tag here but you use whatever tag you are using.

Then in your CSS file you can apply a different class to each....

Code:
.item1 {
your css: rules here;
}
Code:
.item2 {
your different css: rules here;
}
Hope this helps.

Regards, Paul
tux is offline   Reply With Quote
Old 03-08-2008, 06:04 AM   #3
Cary
Cary's Avatar
 
Join Date: Apr 2007
Location: San Diego, CA
Posts: 723
Default

Another approach is to give the body tag of a page an ID or class. So maybe you only want styling to affect p elements on the home page rather than all pages. You might use:

HTML Code:
<body class="home">
And then the css might look like this:

Code:
body.home p {
    line-height:1.5;
}
Cary is offline   Reply With Quote
Old 03-08-2008, 12:42 PM   #4
tux
tux's Avatar
 
Join Date: Feb 2007
Location: Isle of Wight, that little island right at the bottom of the UK
Posts: 657
Default

Thats a good idea Cary, hope it helps RyRiggsy.

Cary could you take a look at this post.......


http://www.dreamweaverclub.com/forum...ad.php?t=27523

...... I'm still trying to get up to speed with CSS. I've done a little test image gallery, could you see if I'm doing it correctly or is there a better or more simpler way. The layout is how it needs to be on the site its for.

Thanks mate.

Regards, Paul
tux is offline   Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 05:07 PM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com