Link to home
Start Free TrialLog in
Avatar of James Coats
James CoatsFlag for United States of America

asked on

CSS3 position image to center

I can't seem to get the CSS to position my images to the center of the table data tag. Can someone take a look at this please?backyard-example1.html
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland image

Replace all your style block with this:
table td {
    text-align: center;
}

Open in new window

Here's a working demo
Just be aware that this will apply to all tables in the page.
Probably you want to be a bit more specific when applying styles in order to avoid modifying other other elements unintentionally.
Avatar of James Coats

ASKER

Hi Alex,

I just tried the code and it does not work for me or on your link. The text is centered but the image file still goes to the right. I am really having some problems on what seems like a very easy fix.
ASKER CERTIFIED SOLUTION
Avatar of Alexandre Simões
Alexandre Simões
Flag of Switzerland 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
Alexandre,

That worked perfectly!!

Sam