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

Popular posts from this blog

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -

node.js - Bad Request - node js ajax post -