Here is the code I use to keep an image always centered inside its containing div, regardless of browser width or resizing:
<img src="yourimage.jpg" style="width:100%;margin:0 auto;">
Tags: css, div, html, images, tip, trick
▶ Reply to This
Sign Upor Sign In
Or sign in with:
Community Spotlight: Well-Adjusted, A Bridge to the Next Generation of Insurance Adjusting Professionals
20 Fantastic Content Ideas For Your Online Community
What is Your Community Support System?
Digest Emails: Yea or Nay?
Create Content That Your Community Will Love [Video]
© 2013 Created by Ning.
Report an Issue |
Terms of Service
Please check your browser settings or contact your system administrator.