Page 1 of 1

CASCADING style sheets

Posted: Mon Aug 25, 2003 3:59 am
by 9902468
Just checking, before I plan more...

1. Include one css file

Code: Select all

p {
     color: black;
     text-decoration: underline;
}

2. Include second css file

Code: Select all

p {
     color: red;
}

The color is red, no? Latest introduced class overrides previously introduced ones. However are, in my example, the p underlined? Eg. is there inheritance? How well browsers handle this?

Thanks,

-99

Posted: Mon Aug 25, 2003 4:14 am
by Nay
I'm not sure what you want but yes, the P will be underlined and in red color. Why would you want to do it in the first place. I won't validate as valid CSS (since I like my CSS to be valid) - you'll get a "redefined" error if I'm not mistaken.

-Nay

help with css

Posted: Tue Aug 26, 2003 4:11 pm
by creditwrench
I'm useing Dreamweaver and it has css capability of course but I just can't seem to get a handle on how css works or how to build style sheets or anything else.

I've tried several on line tutorials and still can't make any sense out of it.
Maybe I'm educationally handicapped or something but I can usually learn most things pretty fast if I can just see the overall scheme of things first so I know what the end result should be. Once I kow what the end result should look like and get a handle on the command set I can pretty well make things work.

I'm using frames on my website right now and that isn't getting me a lot of good comments or rave reviews to say the least.

What I want to accomplish is to keep my link list on the left side and the banner at the top and then have my main content all down the right side.

I've tried to use tables to get the job done and can't make them work properly either.

Posted: Tue Aug 26, 2003 7:18 pm
by McGruff
Overriding could in fact be useful if you have a defined p style, then want to overide attributes here and there, eg by:

<p style="color: #fff;">new colour here: other paragrapsh not affected</p>

In reverse order of precedence:

stylesheet
styles defined in document <head>
attributes defined inside tags

AFAIK inheritance doesn't pose any problems - at least with newer browsers.

Worth a look for some CSS tips:

http://www.alistapart.com/stories/
http://www.glish.com/css/
http://www.tantek.com/CSS/Examples/boxmodelhack.html