html - How to align the first line of a paragraph center to an image. And the other lines and the first line are the same indentation? -


i have image , paragraph. want 'css' image on left , paragraph on right. , first line of paragraph has display center image. , other lines have indent same first line.

can css that? hope can teach me way achieve that.

thank in advanced!

html:

 <div class="parent">   <img src="http://jsfiddle.net/img/logo.png">   <div class="child">  bottom of element aligned bottom of parent element's font. bottom of element aligned bottom of parent element's font. bottom of element aligned bottom of parent element's font.    </div> </div> 

css:

img {     display: inline; } .child {   display: inline; } 

here jsfiddle: https://jsfiddle.net/qn4bh8ht/

don't work @ all. :(

try these: jsfidle.

i use display: table .parent class table-cell children + vertical-align: top on .child class.

.parent {   display: table; } .parent > * {   display: table-cell; } .child {   vertical-align: top; } 

Comments

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -