1

I'm trying to make a custom css grid:

.row
  box-sizing: border-box
  background-color: tomato
  font-size: 0
.row:after
  content: ""
  display: table
  clear: both
[class*="col-"]
  float: left
  min-height: 1px
  box-sizing: border-box
.col-1-4
  width: 25%
.col-3-4
  width: 75%
.col-2-3
  width: 66.66667%
.col-1-3
  width: 33.33333%

But when I'm zooming page a 1px gap appear in the end of row: Image

So how can this be avoided?

1 Answers1

1

Probably it is just a rounding error. See also: Fixing Sub-Pixel rounding issue in a CSS Fluid Grid

You can avoid this by giving the last column in a row width: auto.

Community
  • 1
  • 1
Marvin
  • 9,164
  • 3
  • 26
  • 44