Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS Please help: Margin or Padding

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #31720
    chickentulip
    Member

    I don’t understand the following: I have created a page container with a separate div header and also h1 in the header. I user universal selector to offset all paddings and margins.
    My intension was to make sure that h1 is not totally on the top of the header which has a set height, but a little bit below. So, I decided to insert:
    h1
    {margin-top: 10px;}

    However, instead of just shifting h1 10 pixel down in the header, my code shifted header 10px from the top of the browser.

    h1{padding-top: 10px } is what works for me. However, i do not understand why applying margin to h1 does not give me the same result. Who can tell me why? The link is below. thank you
    http://www.sevda.netii.net/week8/

    #58978
    davidlab.be
    Participant

    like wolf said…use top padding on the header and be done.

    #58888
    chickentulip
    Member

    thank you very much.

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘CSS’ is closed to new topics and replies.