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

Improvement on ghost element centering technique

  • # April 16, 2013 at 10:30 am


    When working on a responsive landing page I ran into a weird issue with the ghost element centering technique that is documented here:

    Where in Firefox and IE9 the centered element would collapse beneath the ghost element in narrower desktop browsers. I scoured the internet and the comments thread of the above article and came up with nothing. A coworker suggested using white-space: nowrap on the containing element, and sure enough this fixed the problem! Needless to see I was super happy and wanted to share in case someone else is banging their heads against the wall with this.

    A simple use case is here:

    Hopefully this helps someone else out.



Viewing 1 post (of 1 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