html - Fit width of a div inside another div that has padding left and right -


i have divs. div outside has left , right paddings. div inside has width of 100%, these 100% not include padding left , right.
example:

<div style="width:200px; height: 300px; padding-left:15px; padding-right:15px; background-color:green">  	<div style="width:100%; height:300px; background-color:blue">  <div>

my goal is, blue div becomes width green div. not want leave 100% width blue , enter in px keep responsive website. there html/css way?

you try this:

<div style="width:200px; height: 300px; padding-left:15px; padding-right:15px; background-color:green">  	<div style="width: calc(100% + 35px); height:300px; background-color:blue; margin-left: -15px;">  <div>


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -