Image not in the right place[HTML/CSS] -
i want image(near-logo.png) in header-content div, in header div. image @ moment in left side, has in left side of header-content div. header div 100% width, header-content div 946px width.
<!doctype html> <html> <head> <title>webpage</title> <link type="text/css" rel="stylesheet" href="stylesheet.css"/> </head> <body> <div id="header"> <div class="header_content"> <img src="img/near-logo.png"/> </div> </div> </body> </html> body { margin:0; padding:0; } #header { background-color:#353c3e; height:80px; width:100%; position:relative; } .header-content { width:946px; position:absolute; margin:0 auto; }
i see 2 problems:
first thing, have mistake in css, class in div <div class="header_content">
but in css it's .header-content
.
second thing, delete position: absolute
attribute if want header content centered.
Comments
Post a Comment