/    Sign up×
Community /Pin to ProfileBookmark

Weird psace after img tag

When i put some img into a div i get line of 1 pixel space under the image.
When i put it into a table instead (separate tr than what is below) it seems ok.

How can i get rid of the space line?
I tried vspace it not helps.

to post a comment
JavaScript

4 Comments(s)

Copy linkTweet thisAlerts:
@TrolloCauthorJan 28.2006 — btw i am using explorer browser
Copy linkTweet thisAlerts:
@David_HarrisonJan 28.2006 — You can eliminate that in one of two ways. Apply display:block to the image, but if you do that then you won't be able to get text to line up next to it unless you float it to the left or right. Or you can apply vertical-align:bottom; on the element that the image is contained in.
Copy linkTweet thisAlerts:
@TrolloCauthorJan 28.2006 — perfect.

Can you maybe explain to me why display:block fixes it?

And why it puts this space in the first place?
Copy linkTweet thisAlerts:
@David_HarrisonJan 28.2006 — It's all explained in this article:

http://www.autisticcuckoo.net/archive.php?id=2005/01/13/block-vs-inline-3

Scroll down to the bottom where there is a title, "Some Final Words" and read from there.
×

Success!

Help @TrolloC 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 5.18,
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: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

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

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...