Avatar of James Coats
James Coats
Flag 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
CSSHTMLImages and Photos

Avatar of undefined
Last Comment
James Coats

8/22/2022 - Mon
Alexandre Simões

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.
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
Alexandre Simões

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
James Coats

ASKER
Alexandre,

That worked perfectly!!

Sam
I started with Experts Exchange in 2004 and it's been a mainstay of my professional computing life since. It helped me launch a career as a programmer / Oracle data analyst
William Peck