/    Sign up×
Community /Pin to ProfileBookmark

Strange Extra Space (ALL browsers)

I’ve tried it in FF, IE, Opera, Safari and all of them put just about two pixels of extra empty space below the image.

[CODE]<div id=”centercontainer”>
<div class=”centerimage” style=”float: left;”>
<a href=”#”>
<img src=”images/15inthumb.jpg” width=”65″ />
</a>
<br />
<span>blah</span>
</div>

</div>[/CODE]

[CODE]div.centerimage {
width: 65px;
height: 110px;
margin-right: 30px;
padding: 0;
}

.centerimage a:link {
}

.centerimage a:visited {
}

.centerimage a:hover {

}

.centerimage a:focus {

}

.centerimage a:active {

}

.centerimage a img {
width: 65px;
height: 100px;
border: 0;
background-color: #FFFFFF;
margin: 0;
padding: 0;
font-size: 0px;
}

.centerimage span {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 9px;
color: #8D6194;
}[/CODE]

It’s not a big deal until I put stuff beneath it. I’ve tried setting borders, paddings, line heights, font sizes, hspace, and vspace to 0 and it has no effect.

to post a comment
CSS

2 Comments(s)

Copy linkTweet thisAlerts:
@KDLADec 26.2007 — Put "display: block;" in your img's style.

KDLA
Copy linkTweet thisAlerts:
@crazycoderauthorDec 26.2007 — thanks so much!
×

Success!

Help @crazycoder spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...