Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #19515

a simple question abou css

From "Tony" <tony.johansson@inport.com>
Newsgroups comp.lang.javascript
Subject a simple question abou css
Date 2013-04-28 12:11 +0200
Organization A noiseless patient Spider
Message-ID <klisdj$gc6$1@dont-email.me> (permalink)

Show all headers | View raw


I know this is not the correct forum for this question but I assume that you 
know the answer in spite of that.

The reason I ask is because I just want to get a confirm that I have right 
and the book is wrong about the order or rules in the style sheet.
The book says "The order in which rules appear within the style sheet, 
however, does not matter"
The order of rules in the example from the book is correct and it works as 
expected.
The h3 override font-weight to normal.

But if I move this rule
h3
{
  font-weight:normal;
}

before this rule
h1,h2,h3
{
    color:#000000;
    background-color:#FFFFFF;
    font-family:Arial, verdena, sans-sarif;
    font-weight:bold;
}
it doesn't work as expected and that proves that the book must be wrong with 
the text or that the book means something different.


//This is the correct order of rules and the way the example is presented in 
the  book.
<style>
  h1,h2,h3
  {
      color:#000000;
      background-color:#FFFFFF;
      font-family:Arial, verdena, sans-sarif;
      font-weight:bold;
  }

h3
{
  font-weight:normal;
}
</style>

//Tony 

Back to comp.lang.javascript | Previous | Next — Next in thread | Find similar | Unroll thread


Thread

a simple question abou css "Tony" <tony.johansson@inport.com> - 2013-04-28 12:11 +0200
  Re: a simple question abou css "Jukka K. Korpela" <jkorpela@cs.tut.fi> - 2013-04-28 14:10 +0300
  Re: a simple question abou css "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2013-04-28 17:16 +0200

csiph-web