Grow your CSS skills. Land your dream job.

rounding up problems

  • # July 15, 2013 at 7:22 am

    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?

    # July 15, 2013 at 7:30 am

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

    There are a couple of ways of doing this.

    http://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

    # July 15, 2013 at 9:42 am

    Thanks I will try it out

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

You must be logged in to reply to this topic.

*May or may not contain any actual "CSS" or "Tricks".