html - div a in div b, the background color of div a not affect on all div b -


i have html code:

    <div class="col-2">             <div class="leftcol ">                 <h3>when see puzzle</h3>                 <div class="image">                     <img alt="img" src="images/sreak1.jpg" width=75% height=75%>                         <h3>it scares me </h3>                 </div>                 <div class="image">                     <img alt="img" src="images/panda1.jpg" width=75% height=75%>                     <h3>i have sove it</h3>                 </div>                   <div class="image">                     <img alt="img" src="images/sreak2.jpg" width=75% height=75%>                     <h3>i consult friends</h3>                 </div>                </div>         </div> 

while define background "leftcol", there place in "col-2" background don't cover (for reason "col-2" bigger "leftcol", , under "leftcol" there still have place "col-2", not "leftcol") . how can solve it? adding css code :

*{ -webkit-box-sizing: border-box; -moz-box-sizing: border-box; -ms-box-sizing:border-box; box-sizing: border-box;   } .leftcol{ background-color:rgb(260,60,30); } .col-2{ width:16.66%; } 

i think having margin or padding try this.

.col-2{   padding:0; } .leftcol{       margin:0;       height:100%;       width:100%  } 

Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -