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

Home Forums CSS Improvement on ghost element centering technique

  • This topic is empty.
Viewing 1 post (of 1 total)
  • Author
  • #44148


    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)
  • The forum ‘CSS’ is closed to new topics and replies.