Forums

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

Home Forums CSS margin top -100px

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #295078
    macpheek
    Participant

    Hi, I want to have my main content overlapping my banner image. I’ve set the div’s top margin to -100px. It’s moving up the content successfully but not the background colour, any ideas?

    Thanks, help appreciated!
    Page link – http://makingitasuccess.co.uk/wp/services/wedding-planner/

    #295092
    Paulie_D
    Member

    z-index (and it really doesn’t need to be that high) only works if the element is NOT position:static

        background: white;
        padding: 0 45px;
        width: 95%;
        margin: -100px auto 0 auto;
        max-width: 1400px;
        z-index: 1;
        position: relative; /* fix */
    }
    
    #295117
    macpheek
    Participant

    thank you so much! :-) :-)

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