Reputation: 633
I want to achieve this:
I have achieved this:
I don't understand why is there gap above the button images? The page is live at http://shrineweb.in/other-files/clients/omypet/tellerest/index.html
Markup:
<section id="banner">
<nav> <a href="#"><img src="images/tellerest-homepage-design_09.png" alt=""></a><a href="#"><img src="images/tellerest-homepage-design_10.png" alt=""></a><a href="#"><img src="images/tellerest-homepage-design_11.png" alt=""></a><a href="#"><img src="images/tellerest-homepage-design_12.png" alt=""></a>
</nav>
</section>
CSS:
#banner { width: 950px; margin: 0 auto; text-align: center;}
#banner nav { margin: 0; padding: 0;}
#banner nav img { margin: 0; padding: 0;}
Upvotes: 0
Views: 82
Reputation: 14345
You can use either of these to prevent this:
header img {display: block;}
header img {vertical-align:top;}
The gap is caused by the image's default vertical-align: baseline
, which aligns it with the baseline of any text it might sit beside.
Upvotes: 0
Reputation: 6646
There is a float issue please add this code
header img {
display: block ;
}
Upvotes: 0
Reputation: 103780
The issue is created by the logo image. Images are inline elements so they have a white-space after them. To remove the white-space, you can display the image as a block element by adding this CSS :
header > img{
display: block;
}
Upvotes: 2
Reputation: 1019
Change your header css and add same height as your image like this
header { width: 950px; height: 56px; margin: 0 auto; text-align: left;}
Upvotes: 0