html - Content not touching the sides of the screen -
i want have header in div, div isn't directly touching of page, there little bit of room on sides. why? , how can remove that? div just
<div class="header"> <img src="images/header.png" width="600" height="252" alt="header" /> </div>
and style.css file contains
.header { background: url(../images/header_extend.png) repeat-x center; overflow: hidden; } .header img { display:block; margin:0px auto; max-width: 100%; height: auto; overflow: hidden; }
the header_extend.png fill rest of screen width.
you should remove default margin body tag.
body { margin:0 }
additionally, if want use percentage .header
div's width, should specify parent's width well. in case parent body tag, can do:
body { margin: 0; width: 100%; }
here's fiddle
Comments
Post a Comment