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 make float navbars with JS and CSS?

    How to use preloaded CSS spritesheet in javascript?

    How would YOU do this: Tables or CSS? [closed]

    How to minify css files with RequireJS

    How can I center the table in the page?

    How to remove property from a child element?

    How to make a wrapper for HTML, CSS and Javascript Pages in iOS

    How to get slanted borders in CSS

    How to force elements to be in middle?

    How to add new table rows and columns with table headers to css table

    How put a top border to a title that only cover the letters in css

    How to center icons in div consistently? [duplicate]

    How to put the div at the center with css?

    How do I toggle CSS with jQuery?

    How to get rid of space and align two objects in one line in css/html?

    How to achieve mouseover effect where a hover div slides in from the side

    How can I prevent divs animated using CSS keyframes from colliding

    when click on button then show message

    How to add schedule elements into this calendar?

    How to do the Height of html tag Body on 100% of browser window size?

    How to get angled corner like this in CSS, it's not round?

    How to implement single-line ellipsis with CSS

    How to write css rule that run with a special browser?

    Flexbox and Bootstrap How to Put Image in Navbar Brand Area

    How to align center without break the user experience?

    How to dynamically change the value of a CSS property inside a stylesheet?

    Refactor link to show/hide a table row

    How can i Change the DOt in a JavaFx RadioButton?

    How we can add a span to a text inside ul, that is outside of li in jquery or css

    How to display data from a file on website load? [closed]