css - Center text next to image in dynamically created div. jQuery -
at moment, text aligned top of image. there way me pad text down aligned center of image?
any padding add ui-title moves entire div.
or have restructure jquery achieve this?
pagediv.append( $('<div>').addclass('ui-title').text('hello').append( $('<img class="confirm" src="image.png" alt="" height="30" width="30"></img>') ) )
first off first comment says, there no need </img>
. img tags can self closing can change <img class="confirm" src="image.png" alt="" height="30" width="30" />
.
your looking use vertical-align: middle;
need make sure div containing text set display: inline;
or display: inline-block;
.
Comments
Post a Comment