clarkk
clarkk

Reputation: 27689

avoid spaces between img

How to avoid the spaces between img tags?

The content in the print screen is marked

enter image description here

code:

#menu > img {
    margin:0px;
    padding:0px;
}

<div id="menu">
    <img src="/gfx/menu.home.png" />
    <img src="/gfx/menu.functions.png" />
    <img src="/gfx/menu.prices.png" />
</div>

Upvotes: 2

Views: 170

Answers (3)

Šime Vidas
Šime Vidas

Reputation: 185923

You could float them:

#menu {
    overflow: auto;
}

#menu > img {
    float: left;
}

Live demo: http://jsfiddle.net/bzWYX/

Btw I have asked a similar question here.

Upvotes: 1

Ray Cheng
Ray Cheng

Reputation: 12576

<div>
    <img src="/gfx/menu.home.png" /><img src="/gfx/menu.functions.png" /><img src="/gfx/menu.prices.png" />
</div>

Put the img tags on one line will do the trick.

Upvotes: 0

Marek Sapota
Marek Sapota

Reputation: 20591

Remove spaces between the img tags in your code.

<div id="menu">
    <img src="/gfx/menu.home.png" /><img src="/gfx/menu.functions.png" /><img src="/gfx/menu.prices.png" />
</div>

Upvotes: 4

Related Questions