How do I vertically center an image within a panel in Step Carousel? -
how vertically center image within panel in step carousel?
can input command following:
<div class="panel"> <a href="url" target="_blank"> <img src="/image" border="0" position= "center" alt="copy goes here" /> </a> </div>
thanks
this simple way: http://jsfiddle.net/david_knowles/xvmzf/1/
.panel { vertical-align:middle; /* key */ display:table-cell; /* key */ height:400px; width:600px; text-align:center; background-color:yellow; } <div class="panel"> <a href="url" target="_blank"> <img src="http://dummyimage.com/300x200/000/fff&text=dummy-image" alt="copy goes here" /> </a> </div>
this supported in modern browsers, ie8 , up.
this work in older browsers have know height of .panel http://jsfiddle.net/david_knowles/xvmzf/2/
Comments
Post a Comment