HTML CSS examples for CSS Layout:Width
Set an element's width equal to window's width
<html> <head> <meta name="viewport" content="width=device-width, initial-scale=1"> </head> <!-- w w w . j av a2s . c om--> <body> <div style="width:100%; padding: 20px;"> <div style="width:100%; background:red"> Test </div> </div> </body> </html>