Css grid goes wrong

I tried to do some grid in css, but something went wrong here, and I didn't understand what I do wrong, follow my jsFiddle with the code

jsFiddle

/*Grid*/
.container {
  width: 100%;
  max-width: 1200px;
}
.row:before,
.row:after {
  content: "";
  display: table;
  clear: both;
}
[class*='col-'] {
  float: left;
  min-height: 1px;
  width: 8.3333%;
  padding: 15px; /*Gutter*/
}
.col-lg-1 {width: 8.3333%;}
.col-lg-2 {width: 16.6666%;}
.col-lg-3 {width: 25%;}
.col-lg-4 {width: 33.3333%;}
.col-lg-5 {width: 41.6666%;}
.col-lg-6 {width: 50%;}
.col-lg-7 {width: 58.3333%;}
.col-lg-8 {width: 66.6666%;}
.col-lg-9 {width: 75%;}
.col-lg-10 {width: 83.3333%;}
.col-lg-11 {width: 91.6666%;}
.col-lg-12 {width: 100%;}

Someone could help with this?

Answers


what you are missing is box-sizing:border-box;

https://developer.mozilla.org/en-US/docs/Web/CSS/box-sizing

demo: https://jsfiddle.net/6h7ka51k/3/


Need Your Help

How to access lists in Rcpp?

c++ r rcpp

I want to use Rcpp to make certain parts of my code more efficient. I have a main R function in which my objects are defined, in this R functions I have several rcpp functions that use the r data o...

visual C++ program how to make it interact with other program

c++ qt

I have question how to make a program and then run it on 2 different computers, and then I'd like to somehow connect them together, so they could interact with each other. For example i type some t...