HighDots Forums  

Order in style sheet

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Order in style sheet in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Gianni
 
Posts: n/a

Default Order in style sheet - 06-06-2009 , 03:08 PM






I'm learning CSS and came across
this anomaly when I was trying
body and p in a style sheet.

p {
font-weight: bold;
color: blue;
}
body {
font-family: Verdana;
{

When I do the above, the paragraph
turns out blue.

On the other hand, switching p and body,
p {
font-weight: bold;
color: blue;
}
body {
font-family: Verdana;
{

produces black text.
What am I not understanding?

Reply With Quote
  #2  
Old   
Jukka K. Korpela
 
Posts: n/a

Default Re: Order in style sheet - 06-06-2009 , 03:27 PM






Gianni wrote:

Quote:
I'm learning CSS
Apparently from a poor source, as you are setting paragraph text to bold,
using Verdana, and setting color (to blue at that!) without setting
background. It's just an example you're giving, but a very bad example.

Quote:
p {
font-weight: bold;
color: blue;
}
body {
font-family: Verdana;
{

When I do the above, the paragraph
turns out blue.

On the other hand, switching p and body,
p {
font-weight: bold;
color: blue;
}
body {
font-family: Verdana;
{

produces black text.
Really? I don't see any difference. The stylesheets are identical.

Quote:
What am I not understanding?
The necessity of posting a URL, to begin with.

--
Yucca, http://www.cs.tut.fi/~jkorpela/

Reply With Quote
  #3  
Old   
Gianni
 
Posts: n/a

Default Re: Order in style sheet - 06-06-2009 , 08:11 PM



Jukka K. Korpela wrote:
Quote:
Gianni wrote:

I'm learning CSS

Apparently from a poor source, as you are setting paragraph text to bold,
using Verdana, and setting color (to blue at that!) without setting
background. It's just an example you're giving, but a very bad example.

p {
font-weight: bold;
color: blue;
}
body {
font-family: Verdana;
{

When I do the above, the paragraph
turns out blue.

On the other hand, switching p and body,
p {
font-weight: bold;
color: blue;
}
body {
font-family: Verdana;
{

produces black text.

Really? I don't see any difference. The stylesheets are identical.

What am I not understanding?

The necessity of posting a URL, to begin with.

I apologize for the question.
There was an error on my part
that caused the problem.

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

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.