468,321 Members | 1,669 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,321 developers. It's quick & easy.

How do I center a image in CSS?

How do I center an image in CSS?

I tried adding: align:center but that did not work
it's an image wrapped by a div.

Expand|Select|Wrap|Line Numbers
  1. <div style="align:center">
  2. <img src=".."/>
  3. </div>
Apr 5 '12 #1
2 1863
1,059 1GB
This is interesting. div css dont have any align. but you can use tag align.

follow the link. here is some suggestion
Apr 12 '12 #2
<div style="text-align:center"><img src=""></div>


<div><img src="" align="center"></div>


<div><center><img src=""></center></div>
Apr 16 '12 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by steven | last post: by
6 posts views Thread by Zach | last post: by
11 posts views Thread by mercurius_1 | last post: by
3 posts views Thread by Dustin Carroll | last post: by
5 posts views Thread by Maaike | last post: by
4 posts views Thread by hsriat | last post: by
2 posts views Thread by jerrygadd | last post: by
14 posts views Thread by gaijinco | last post: by
1 post views Thread by howard w | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.