When I have a with width: 100%, it is not really 100%: testtesttesttesttest ... #di
with width: 100%, it is not really 100%: testtesttesttesttest ... #di
width: 100%
testtesttesttesttest ... #di
Width: 100%, is highly affected by its margin and margin and padding of its parent (body in your case). SO, reset them first
Something like
body { margin: 0; padding: 0; } #div { margin: 0; width: 100%; background-color: red; }
DEMO