Whenever i want to make a html page i have problem with this, why html page is less than 100%? Let me explain in example:
When you give display: inline-block;
it generates spaces in-between them. Use the same code this way:
Some textSome textSome textSome textSome textSome textSome textSome textSome textSome text
Fiddle: http://output.jsbin.com/xorahifipe
You can also use float: left
, but you need to give overflow: hidden;
to the parent, or clear it somehow. With your original example, float
works this way:
.row {
width: 100%; /* This is not necessary */
margin: 0 auto; /* This is not necessary */
padding: 0; /* This is not necessary */
overflow: hidden;
}
.col-1 {
width: 10%;
margin: 0; /* This is not necessary */
padding: 0; /* This is not necessary */
float: left;
}
Fiddle: http://output.jsbin.com/daruzepiqa/1