The Lodge is members-only design/dev videos and Office Hours.

Next Office Hours Session: "Implementing an SVG Icon System" Nov 30 - 6:00 PM Eastern

@media and position:absolute problem in Chrome

  • # January 16, 2013 at 8:48 am

    Hey crew,

    I’m making a responsive website where the submenu has position:absolute. When switching to mobile (width < 580) it becomes relative again. But when increasing window size again, the position:absolute is not picked up again. This problem only occurs in Chrome. Link to the code:

    Thanks for the help!

    # January 16, 2013 at 8:49 am

    PS: Safari also refuses to revert back correctly.

    # January 16, 2013 at 9:22 am

    This reply has been reported for inappropriate content.

    @Yvon, your submenu is just fine, it goes back to absolute for me in Chrome, but I’d change your parent menu’s <li> tags to inline-block, rather than inline, or, alternatively, add a float: left; to the <li> tags, and add a clearfix to your .content

    # January 16, 2013 at 10:01 am

    That did the trick! Thanks Chris. After a while, you’ve just been staring too long at the same code :)

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.

There's a whole bunch of content on CSS-Tricks.

Search for Stuff   •   Browse the Archives

Get the Newsletter ... or get the RSS feed