Reputation: 803
I've got a LOT of white space below my image (picture below). And I've got no clue why it's like it.
My HTML:
<img src="images/testserver2.png" class="centerimage" style="display: block; margin-left: auto; margin-right: auto; height: 100%;" />
<div class="internet">
<h3>INTERNET</h3>
</div>
My CSS:
.centerimage {
display: block
margin-left: auto;
margin-right: auto;
width: 100%;
}
Upvotes: 0
Views: 71
Reputation: 1207
Check your image to make sure there's no whitespace embedded in the png itself :)
Upvotes: 2
Reputation: 65
Best way to implement this would be to use either the inline style attribute in your img tag or reference the CSS class.
Upvotes: 0