Link to home
Start Free TrialLog in
Avatar of jxbma
jxbmaFlag for United States of America

asked on

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

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
ASKER CERTIFIED SOLUTION
Avatar of Rob
Rob
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Tables are for tabular data. If you have tabular data (which you do) then use tables
tagit is right
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of jxbma

ASKER

You guys rock.

Thx,
JB