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 align a div with the right of a table?

    How to find all next siblings from a particular class using css selectors

    Finding correct CSS sheet when Chrome Inspector shows (index) [closed]

    How to mark search phrase in syntax highlighted markdown code?

    web app CSS navbar retina icons - How can I fit a 60x60 icon into a 30x30 background-image on IE7+8?

    How to manually override CSS @media queries?

    How to set style of active page number in ASP.NET GridView Pager?

    How can I get this toggled drop down menu to be open by default - rather than having to have someone click it to initialize it?

    How to apply custom css to split post into multiple page

    How to make input text bigger in bootstrap css framework?

    HTML element positioning - How do I have an element always stay in the visible area without javascript

    jQueryUI Autocomplete: how to use 'first-of-type' and 'last-of-type' with #ui-active-menuitem?

    How to make a bullet of an image slider look different while is active?

    how to align the content of a box

    how i can show the image in middle of div i want using CSS

    How to change the order of columns in CSS template to put important content first?

    Jquery Mobile dynamic thumbnail list-How to create a border?

    How to make a background-color transition that eventually covers div to center? [closed]

    custom styles not effecting the nested accordion jquery - How to fix

    Css Tricks - How to align 4 div's

    How to define the css :hover state in a jQuery selector?

    How to display a header inline with paragraph text using divs or an alternative method

    How to read a browser's unsupported CSS properties?

    How to remove CSS attribute such that HTML attribute will take effect again?

    How to create two column in form using css

    How to accomplish this layout in HTML/CSS?

    How to put multiple Bootstrap inputs on same line?

    How granular are CSS rem units?

    How to design a comment box similar to facebook using only CSS?

    How to apply css, after Jquery adds a class?