troubleshooting Question

How to centre text over image without separate div tag?

Avatar of rihsc102
rihsc102 asked on
CSSHTML
6 Comments1 Solution415 ViewsLast Modified:
I would like to know how to centre text over an image without using a div tag. I am creating a navigation menu and would prefer not to wrap each button within a separate div tag. Probably very simple to do but I'm new to CSS :-P .

At the moment I'm using "text-align:center". This works for the first button, but all txt is centred over the first button, instead of over each individual button.

I have created a jsfiddle to show what I mean: http://jsfiddle.net/3JCKB/

Any help is appreciated!
ASKER CERTIFIED SOLUTION
Join our community to see this answer!
Unlock 1 Answer and 6 Comments.
Start Free Trial
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 6 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