Forums

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

Home Forums CSS rounding up problems

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #46425
    MarkRBM
    Participant

    I have set up a codepen to demonstrate my problem

    http://cdpn.io/AxyDg

    So each of the .excerpts is set to width: 50% using scss variables. the browser is rounding up the width so they are slightly bigger than 50% and therefore the display: inline block isnt working as I want it. If I change the scss variable multiplier to something slightly less lik 7.8 for example it works as I want it but it dosnt line up exactly with the grid anymore. Is there a better solution than just changing the multiplier value?

    #142946
    Paulie_D
    Member

    With inline-block you have to account for white-space in the HTML.

    There are a couple of ways of doing this.

    https://css-tricks.com/fighting-the-space-between-inline-block-elements/

    Here’s the `font-size:0` option in operation : http://codepen.io/Paulie-D/pen/qpDrI

    #142964
    MarkRBM
    Participant

    Thanks I will try it out

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