Tuesday 15 September 2015

html - Get space between an image and text -



html - Get space between an image and text -

i have image using style = "float: left; pushed left side comes bestimter text looks now...

how bit of space between image , text?

<div> <img alt="" src="images/about/uhr.jpg" style="float:left; height:180px; width:180px" /> </div> <blockquote> <p></p> lorem ipsum dolor sit down amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim advertisement minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore european union fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. lorem ipsum dolor sit down amet, consectetur adipisicing elit, sed eiusmod tempor incididunt ut labore et dolore magna aliqua. ut enim advertisement minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore european union fugiat nulla pariatur. excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</blockquote> </br>

try css:

your html code:

<img alt="" src="images/about/uhr.jpg" class="image-margins" style="float:left; height:180px; width:180px" />

your css:

.image-margins{ margin: 10px; }

you can remove style property of image , add together css class like:

html code:

<img alt="" src="images/about/uhr.jpg" class="image-margins" /> <!-- loot @ class attribute -->

css:

.image-margins{ margin: 10px; float:left; height:180px; width:180px; }

whenever add together class="image-margins" attribute img tag, above css applied element.

updated fiddle example

html css

No comments:

Post a Comment