html - How to center align img wrapped in SPAN tag? -
i trying center align image wrapped in <span>
, having trouble doing so. have uploaded css , html jsfiddle: http://jsfiddle.net/7nhhu/1/
i trying image center align content in "block" style (ie. text above , below it, not wrapped left or right)
any appreciated.
.imgframe { border: 1px solid #eaeaea; display: inline-block; margin: 8px; } .imgframe img { border: 1px solid #ffffff; margin: 0; background: #f6f6f6; padding: 8px; -moz-box-shadow: 2px 2px 5px #cccccc; -webkit-box-shadow: 2px 2px 5px #cccccc; } <span class="imgframe centerimg"><img src="http://i48.tinypic.com/31368e9.jpg" /></span>รข
just make image wrapper block level element , text-align:center;
it.
or wrap in element if needed;
Comments
Post a Comment