Reputation: 115
I have an image as a header and in the css I set the width at "100%" but it didn't go the full way so I tried "190%" and it only extending to the right hand side of the page. I then proceeded to change the height to % as it was in px and I wanted it in % to make it look neat as the width is % but then he image disappeared.
plus I can't even change position of the image.
Here is my problem: http(semi-colon)//prntscr.com/3ufy00
Here is my code:
CSS
body { }
#image {
width:100%;
height:178px;
}
HTML
<div class="wrapper">
<header id="menu">
<img id="image" src="http(semi)//oi62.tinypic.com/6t3fp2.jpg">
</header>
</div>
Upvotes: 0
Views: 2720
Reputation: 114991
If your wrapper has a restricted with then any full width elements will need to be outside of it
HTML
<header id="menu">
<img id="image" src="http://oi62.tinypic.com/6t3fp2.jpg" />
</header>
<div class="wrapper"></div>
CSS
* {
margin: 0;
padding: 0;
}
#image {
display: block;
}
.wrapper {
max-width:80%;
margin:0 auto;
/* centered */
height: 150px;
/* just for show */
background-color: gold;
}
Upvotes: 0
Reputation: 298
<div class="wrapper">
<header id="menu">
<img id="image" src="http(semi)//oi62.tinypic.com/6t3fp2.jpg" height="100">
</header>
</div>
You can try like this also.
Upvotes: 0
Reputation: 49
Do you have a reset.css ? body {margin:0; padding:0} try to put the img height to auto, too.
Upvotes: 0