Pseudo selectors dont understand


23.pseudo selectors

Oops, try again. Did you give your third paragraph a font-size of 26px? It looks like it's currently undefined.

.fancy {

#serious {

body :nth-child(3) { 
    font-size: 26px;

even though the error message is saying this, it is showing the correct result in the window! please help


++ serious fancy
The Browser =load's= this document into Memory
in a pattern that is described as
the Document Object Model
in short the DOM.
( the interpretation of the DOM is Browser & Version specific )

       |                |
     head              body
       |                |
    +--+--+       +---+-+-+---+
    |     |       |   |   |   |
   link  title    h3  p   p   p
                 (1) (2) (3) (4)
                  |   |   |   +- :last-child or :nth-child(4)
                  |   |   +- :nth-child(3)
                  |   +- :nth-child(2)
                  +- :first-child or :nth-child(1)

In the description of your document in DOM-talk...
you will encounter terms like:
parent children sibling descendants ascendants...

The HTML-Element has no parent
is also called document
html-Element is a parent to 2 child-Element's
the 'head'-Element
the 'body'-Element.
head and body are both descendants of html

The 'head'- and 'body'-Element,
both being children to the 'html'-Element
are siblings to each-other.

The 'body'-Element is parent to 4 children
h3 p p and p
These h3 p p p Elements are children of the body-Element
and are descendats of the html-Element and the body-Element
The h3 p p p Elements are sibling's to each other.


Well i did try doing that but it didn't work still. I figured out that I had to make an extra blank

line and then put body :nth-child(4) to make it work!


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.