css3 - CSS add a image vertical center with text in a div -
i tried v-align image text in link. until have used background image v-center image of text
css
.label { margin: 0 0 0 15px; padding: 0; color: #fff; } a.moreinfo { background: url(../images/gallery/add.png) no-repeat left center; cursor: pointer; }
html
<a class='moreinfo'><span class='label'>more info</span></a>
now want try not use background images, insert image in html code (img src). tried using vertical-align: middle, image not aligned precisely 1 in background. how same thing image included in html code? thanks
here how can center element in another:
.absolute-center { margin: auto; position: absolute; top: 0; left: 0; bottom: 0; right: 0; }
you can find more in link: http://blog.themeforest.net/tutorials/vertical-centering-with-css/ .
Comments
Post a Comment