2 replies [Last post]
vanderloo5
vanderloo5's picture
Offline
newbie
Fair Oaks Ca
Last seen: 10 years 2 weeks ago
Fair Oaks Ca
Timezone: GMT-8
Joined: 2012-11-09
Posts: 2
Points: 3

What's the magic potion for getting images to center in css?
I have a short doc I'm creating for an email newsletter and I've inserted images with <img src=> and used align="center".
And I've also tried inserting the image as a background image in a style using mergin-left:auto: margin-right:auto: and inserting it with <div> tags
The first method inserted the image all the way to the left.
The second method didn't insert the image at all.
I've attached the doc in case anyone has the time to look it over.
The images in question are Hilinelogo3d.jpg and HB_QR.png
Thanks,

AttachmentSize
Hiline_News_1.txt10.43 KB
Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 4 days ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5344
Points: 2965

Hi vanderloo5, HTML email is

Hi vanderloo5,
HTML email is a nasty can of worms, I usually stay well clear.
You may have to put the image in a div with text-align:center.

<div style="text-align:center;">
  <img src="" />
</div>

vanderloo5
vanderloo5's picture
Offline
newbie
Fair Oaks Ca
Last seen: 10 years 2 weeks ago
Fair Oaks Ca
Timezone: GMT-8
Joined: 2012-11-09
Posts: 2
Points: 3

Nailed it

Tony,.. you're my new hero!
Thank You