/    Sign up×
Community /Pin to ProfileBookmark

valign bottom image

.thumbimage{
width:125px;
height:180px;
border: thin solid #999999;

}

above is my css

this is a div around an image

how can I make it that any image in this div should be vertical aligned centered>

to post a comment
CSS

4 Comments(s)

Copy linkTweet thisAlerts:
@estheraauthorAug 06.2007 — does this mean there is no real way if I don't use tables?
Copy linkTweet thisAlerts:
@KDLAAug 06.2007 — 
the vertical-align property must be applied to the inline-level element that is a child of another element.[/quote]

Change the display of your image to inline and the enclose it in a block-styled div.
<i>
</i>#box {display: block; width: 300px; height: 300px;}
#box img {display: inline; vertical-align: middle;}


KDLA
Copy linkTweet thisAlerts:
@estheraauthorAug 06.2007 — this didn't work

.thumbimage{

width:125px;

height:180px;

border: thin solid #999999;

display:block;.

}

.thumbimage img {

display: inline;

vertical-align: middle;

}
×

Success!

Help @esthera 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.20,
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,
)...