Forums

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

Home Forums CSS My background also moves whenever I type margine-top: 100px; on #showcase h1{}

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #261283
    iixreaperz
    Participant

    So my intention is to move my h1 in the middle of my background coz its on the top part. But whenever I type margin-top: 100px; the background picture also moves. The h1 is still on top part of the picture plus theres a big margin on navigation bar and my first container. Please help.

    https://jsfiddle.net/0ozfeb89/

    #261284
    JeroenR
    Participant

    Maybe you can use flexbox for this?
    Add the following properties to your #showcase styling:
    display: flex;flex-direction: column;align-items: center;justify-content: center; and the header will be completely centered. And also the headers margin doesn’t cause your showcase div to move.

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