/    Sign up×
Community /Pin to ProfileBookmark

how can i vertical align

text? vertical-align: middle; is only supposed to be used w/ inline or table elements but i cant use height: __px; w/ inline elements. So im confused on how i am supposed to be able to vertically align text in a <div> thx for help

to post a comment
CSS

8 Comments(s)

Copy linkTweet thisAlerts:
@Daniel_TAug 13.2004 — If it is only a single line of text you wish to vertical align, you can use line-height: _px; (replace underscore with height of containing element).

Otherwise, there is no way.
Copy linkTweet thisAlerts:
@pawkyauthorAug 13.2004 — it is one line on larger res but on the lower res it is two so i cant use line-height: So there is no way for me to accomplish this at all? O_o
Copy linkTweet thisAlerts:
@Daniel_TAug 13.2004 — Nope, sorray ?
Copy linkTweet thisAlerts:
@pawkyauthorAug 13.2004 — hmm... that really stinks. now to think what to do ? thx for the help though... i guess ;P j/p
Copy linkTweet thisAlerts:
@Daniel_TAug 13.2004 — Well, do you have an example page anywhere? There may be another way to go about it...
Copy linkTweet thisAlerts:
@pawkyauthorAug 13.2004 — i just figured what im going to do ? *tell me if this would be wrong*

I have the header div which has an image floated to the left. then to the right of it is where i was going to have the title (or quote for home page) vertically aligned. So im goign to put another div inside it w/ padding: 45px 0 0 0; which will basically align it in the middle. The only problem is im going to have a different id for each page as i have a different bg header image for every page. soon ill be done w/ the site for the most part and be posting it on the review forum. Does what im doing sound about right? thx for the time
Copy linkTweet thisAlerts:
@Daniel_TAug 13.2004 — I doubt that will work the way you want it to ? Then again, I'm not sure I quite understand what you mean, so I could be wrong.
Copy linkTweet thisAlerts:
@pawkyauthorAug 13.2004 — it worked ?

the temporary link to it is:

http://www.moonshotstudios.com/temporary/index.html

shortly ill be getting that setup to just www.moonshotstudios.com. the only links that currently work are about us, contact, packages, production info. i guess u could give me feedback now if u want ? but dont really worry bout it atm, ill be posting it shortly for review. thx ? tc
×

Success!

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