Forums

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

Home Forums CSS Making inline-block behave like float

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

    Hey all, just curious about something that’s been bothering me for a while.

    Most of the time, I’m using inline methods to create content columns, but what’s bothered me about it is that the times where I need it to be exactly 50% or 25%, I am forced to make it something like 49.5% instead of 50%.

    Here’s just a basic pen illustrating the difference: http://codepen.io/anon/pen/hCxai

    Am I missing something simple that would let it behave the same way as a float in that regard? Or is it just use floats or wait until Flexbox is more mainstream and then problem solved?

    #183045
    Paulie_D
    Member

    Or giving the parent font-size:0 and resetting the font-size on the child.

    They both have their issues but then so do floats.

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