1
Good guys I have 3 columns in a space of 950px;
I did the calculations here on the calculator 950/3 = 316,666666666666667
Only when I convert it to css:
width: 316.6666666666667px;
nothing changes, he takes it as if it were width: 316px;
, I need him to fill the whole screen, it’s missing a little hair, but it doesn’t fill.
And I need a spacing of 10px
for each column less the first column.
My html and css code:
<div class="works">
<h2>Serviços</h2>
<div class="works-boxes">
a
</div>
<div class="works-boxes">
a
</div>
<div class="works-boxes">
a
</div>
</div>
CSS
.works-boxes {
width: 316.66667px;
margin-top: 15px;
float: left;
background-color: #ddd;
border: 3px solid #fff;
}
Thanks, it worked out,
first-of-type
is new to me, I knew thefirst-child
nth-child
andlast-child
.– Guilherme SpinXO
If you want more compatibility with older browsers, you can do what I said, use a normal class, and on the first put
class="works-boxes first"
– Bacco
@Guilhermespinxo see a simplified version http://codepen.io/bacco/pen/aNVRoY
– Bacco
It gave Beast, and I will do with this tip your there is even more organized until.
– Guilherme SpinXO