Forums

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

Home Forums CSS mobile icon not positioning properly

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

    Posted this pen yesterday. Trying to get the responsive mobile icon to stay in the same position when clicked. Thought it was fixed, but gets messed up if the body margin or padding is used.

    https://codepen.io/derek-deboer/pen/XGONqB

    .subnav .icon {
    display: none;
    position: absolute;
    right: 0;
    top: 0;
    }

    Apparently I’m over my head with this.

    #285395
    Paulie_D
    Member

    I think you forgot to use a positioning context. Add position:relative to the parent container

    https://codepen.io/Paulie-D/pen/EMMrPv

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