How to put space between figure in image?

Tags: html,css

Problem :

How can I add some horizontal "padding space" without editing my css file? I have the code below:

<img src="./img/fig.jpg" align="right" style="display:inline;margin:2px;"/>
<div style="text-align:justify;">
Bunch of text.

I've tried specifying style="padding-right: 5px" for the text div or enclosing the img with a div that includes padding, margins, etc. but to no avail - I can see that I can successfully add padding to above and below the text or image with this style specification, but never a space to separate the image and text..

Solution :

If I get it correctly you have an image and a text to the left of it. You want to separate the text and the image with further space. What I suggest is to place an additional margin between them. Do like that:

<img src="./img/fig.jpg" align="right" style="display:inline;margin:2px 2px 2px 5px;"/>

    CSS Howto..

    how to select a class which is children of many elements

    How do I align tables with HTML?

    How do you style an android app?

    How to create icons like font awesome

    How to deal with the hover issue of overlapped non-square DIV?

    How would I make this CSS / jQuery dropdown menu multilevel?

    how to tell org-mode to embed my css file on HTML export?

    how to set div display property block when url have some id?

    How to put padding on SPAN only when not empty

    CSS - how to align different font-sizes to each other?

    How to make div scroll down with a page once it reaches top of page?

    How to prevent the background image from getting blurry

    How to add spacing between checkboxlist items?

    Only Lower Half Of The Border Is Shown

    How can I apply CSS to a JPG server-side?

    How to apply table cell formatting using CSS

    How can I change my code from PHP to HTML?

    HTML/CSS: How can I float the 'a href' elements to the left without them leaving the div element that they are inside in?

    How come half the triangle is missing

    How to center this by using css?

    how to give blur effect for css overflow visible content

    how to prevent vertical Stepdown

    How do I import 2 different files icons?

    how to add a custom font to rails app

    How to create a DIV style switcher in JavaScript?

    How to create new div immediately next to image like on Facebook's news feed on right side of page?

    How to make elements appear one by one using css animation

    How to apply a CSS style to div AND the div nested in the div [duplicate]

    How does one change the colour of a div based on current time?

    How to align elements equally in a line in CSS/Bootstrap?