Forums

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

Home Forums CSS [Solved] Negative TOP problem

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

    I need to move the navigation bar up. The problem is that the content after doesn’t follow it. It worked with margin-top. However it doesn’t work in Firefox/IE that way, and I read I should use top attribute.

    .navbar-inverse {
        position: relative;
        left: 0;
        right: 0;
        top: -56px;
        margin-bottom: 25px;
    }
    
    /* logo image */
    img.logo-fdp { 
        position: relative;
        width: 200px;
        z-index: 2000;
    }
    
    .navbar {
        min-height: 36px;
    }
    
    #171369
    Paulie_D
    Member
    #171377
    redraw
    Participant

    @Paulie_D thanks! That example is very clear. I had forgotten that relative positioning “saved” the space, whereas margin “moved” it.
    Negative margin had worked for me, but only in Chrome. I don’t know why it doesn’t work well inside Firefox or IE.


    @wolfcry911
    thanks! I’ve solved it by moving up the #main-content div by the same amount. It is not very pretty, but now is cross-browser compatible.

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