troubleshooting Question

Whats the best way to center vertically/horizontally allign multiple text lines in a <div>?

Avatar of jxbma
jxbmaFlag for United States of America asked on
CSSHTMLjQuery
5 Comments1 Solution751 ViewsLast Modified:
Hi:

I've got a page that's made up of several colored <div>s arranged in blocks.
I've got a couple of fields data (name, price, quantity) that I need to display in each div.
I'd like this to appear on 3 lines of text.
I'd like these groups of fields to be centered both vertically and horizontally in each <div>.

What's the best way to do this?
Should I created a table that's vertically/horizontally centered within each <div>?

Is there a better/easier/cleaner way to do this?


Thanks,
JB
Text-Field-Alignment-in-Divs.png
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 5 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 5 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros