html5 - Zurb Foundation 5 - Row padding/margin -
i trying create background color row, yet when set background color extends on regular width of columns. tried making row smaller padding, works, makes columns smaller. need somehow remove pink area, keep red background, , keep columns even.
any ideas?
<!-- when applying padding, columns background turns ok. however, columns aren't "normal" columns without padding --> <div class="row" style="background-color: pink; padding-right: 15px; padding-left: 15px; "> <div class="large-3 columns" style="background-color: red;"> text1 </div> <div class="large-3 columns" style="background-color: red;"> text2 </div> <div class="large-3 columns" style="background-color: red;"> text3 </div> <div class="large-3 columns" style="background-color: red;"> text4 </div> </div> <!-- background of columns same of columns, , it's bigger image because of padding --> <div class="row"> <div class="large-3 columns" style="background-color: teal;"> text1 </div> <div class="large-3 columns" style="background-color: teal;"> text2 </div> <div class="large-3 columns" style="background-color: teal;"> text3 </div> <div class="large-3 columns" style="background-color: teal;"> text4 </div> </div> <!-- image has padding in column, it's not whole width of row --> <div class="row"> <div class="large-12 columns" style="background-color: grey;"> <img alt="slide image" src="http://placehold.it/1000x15"> </div> </div>
one way remove column padding causes see pink background in row div , add margin row have them aligned.
.columns{ padding-left: 0rem; padding-right: 0rem; } .row{ margin-left: 0.83333rem; margin-right: 0.83333rem; width:auto; }
here fiddle
Comments
Post a Comment