How to make an HTML div element (with CSS) touch both the right and left ends with background-color?
I want to create a webpage with HTML5 element stretch to both the right and left ends of the webpage with some background color, I tried this:
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
</head>
<body>
<div style="width:100%; height:120px;background-color:green;">
</body>
</html>
It still stayed in the centre < I even tried to position it but that didn't work either.
How do I fix this?