align price into centrally

This is the page. I have a css problem. I don't know how to align the price centrally into the blue background. Can anyone help?
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Well, your first issue is that you have a centered website with no division that is containing the site. This will make doing things like this more tedious.

However, you can do this by changing your #contact and your #contactphone2 divs.

Try this - change the width of your #contact div to 240px from 740px. So the #contact div should look like this:

#contact {
    height: 38px;
    margin: 0 auto;
    width: 240px;

Open in new window

And along with this change your #contactphone2 div to this:

#contactphone2 {
    margin: 0 auto;
    width: 50%;

Open in new window

Here is a screenshot with the above applied.

I don't have any photo editing software on this computer, so I couldn't tell exactly how wide that number is. You might need to change the width of the #contact div if you don't feel it is exactly centered.

sorushAuthor Commented:
Thanks for the input, but I was talking about the prices in the service_boxes. I'm not sure if you follow.
text-align: center; works fine but I'm not sure how to do horizontal align.
Got it.

Sorry for the confusion.

You could achieve this using the line-height property, thought it will mess up the ones that have multiple lines.

You can add

line-height: 29px;

Open in new window

to your span.price at line 496.

Like I said, this will not work for a multiple line. See screenshot for comparison. If this will not work I will research different possibilities.


Experts Exchange Solution brought to you by ConnectWise

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
sorushAuthor Commented:
Thanks for the line height worked perfectly.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.