div 100% width with other div fixed

here’s the code:

<!DOCTYPE html>
<html>

<body>
  <div style="height:100%;position:absolute; width:10%; margin:0; top:0; left:0;  background-color:red;">Content</div>
<div style="height:10%; position:absolute;width:90%; margin:0; top:0; left:10%;background-color:blue;">Content</div>
<div style="height:90%;position:absolute; width:90%; margin:0; top:10%; left:10%; background-color:yellow;margin:0 auto;"><div style="background-color:green;width:95%;height:95%;position:relative;top:20px;left:30px;">Content</div></div>

</body>


</html>

Browse More Popular Posts

Leave a Comment