Link to home
Start Free TrialLog in
Avatar of samiam41
samiam41Flag for United States of America

asked on

Center images in CSS/Html script

Hi experts.  I have a script that includes three images at the bottom.  I would like for those three images to be centered in their box.  Please assist.

Thank you.
<br>
<br>
<div style="width:200px; padding: 5px; border: solid 1px black; margin-right:100px; float:left;">
<img src="website/custom3r-s3vice.jpg" />
<p>Please call</p>
</div>
 
<div style="width:200px; padding: 5px; border: solid 1px black; margin-right:100px; float:left;">
<img src="website/t3xt.m3ssage.jpg" />
<p>Send us a text message!</p>
</div>
 
<div style="width:200px; padding: 5px; border: solid 1px black; margin-right:100px; float:left;">
<img src="website/3mail.jpg" />
<p>Send us an email!</p>
</div>
</div>
</body>
</html>

Open in new window

ASKER CERTIFIED SOLUTION
Avatar of Michel Plungjan
Michel Plungjan
Flag of Denmark 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
Avatar of samiam41

ASKER

I tried modifying the margin-right and float:left options with no luck.  I did searches so that I didn't just throw up a easy question.  ; )  Cr@p!

Thanks.  Testing now.
Is it supposed to center the image as well?  I'm glad it does, just didn't know if that was something expected.

*I bookmarked the website you mentioned so I can build up a personal knowledge base of info to refer to.  Thanks.
Have you tried
<div style="width:200px; padding: 5px; border: solid 1px black;  float:left; text-align:center">

md
You mean like the  text-align:center; I posted in #23612983
Sorry about that...but yes...

MD - I am on GMT...Will join later.
Thanks for the post.  mplungjan has this wrapped up.  ; )

@mplungjan- Is it supposed to center the image as well?  I'm glad it does, just didn't know if that was something expected.
Yes. There is no "image-align" in css
You the man.  Thanks as always for being a true pro!
I like this CSS thing.  Glad I finally found a purpose for learning it and a great teacher.  Take care!

Best regards,
Aaron