Jump to content

eTianbun

Members
  • Posts

    547
  • Joined

  • Last visited

Posts posted by eTianbun

  1. ...How come you take <h1> as a child of the <p> tag?? I dont understand at all your explanation is not OK!!Please see that the...
    Not ok? How did you know it's not ok? The parent element, is the <body> tag, while <h1> is the first-child of <body> tag, so the first <p> is the 2nd child of <body> and the the 2nd <p>, is the third child of <body>, etc.
    • Like 1
  2. You are using:

    nth-child(2)

    which assign value to any <p> element, that is the 2nd child of it parent. <h1> was the first child, while

    <p >...first paragr...</p>

    was the 2nd child. If you want to target any 2nd <p> element, of its parent, use:

    nth-of-type(2)

  3. I dont realy get you tho! Do you mean: Group each input and its label together? If yes,use:

    <fieldset>

    to group each input and its label together, then apply

    margin-bottom

    to the <fieldset> tag.

  4. Just like Ingolme said, you need to set it yourself! Use the global selector (*) to set all element's padding and margin to 0 (zero):

    *{padding:0;margin:0;}

×
×
  • Create New...