خرید بک لینک

Vote count: 0

For the below html I get a browser scrollbar, While I would like a scroll bar in the blue content area and the green header to stay fixed. Tried overflow:auto doesn't help.What am I getting wrong here ?

<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">        
  </head>
<body style="width: 100%; height: 100%; padding: 0; margin: 0">
    <div style="background: green; font-size: 20px; height: 100px">
      Header 
    </div>
    <div style="background: blue; overflow: auto;">
       <div style="height: 1000px">
         content
       </div>
    </div>
</body>
</html>

asked 1 min ago

برچسب: نویسنده: استخدام کار تاريخ: شنبه 21 فروردين 1395 ساعت: 16:52

صفحه بندی