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 do I make my CSS link up to files in different directories

    How can I replace the text in an

    from a CSS file without using a tag?

    How to set background image for body tag using css?

    How to change tooltip color on open using jQuery UI Tooltip?

    CSS: How to decrease the margin of my paragraphs inside a div?

    How to design a cross client / browser compatible email?

    How to move the icon / button outside the textbox x-webkit-speech?

    How to change color of Bootstrap warning class table row

    Best Practice (jQuery, CSS): How to initialize hidden elements that will toggle visible?

    How to make a bootstrap modal fade in from the bottom?

    How can I reduce the spacing between my legend and chart proper in my Chart.JS bar chart, and increase it in the graph area?

    How combine multiple media destinations (screen, print) with width restriction?

    How to modify multiple CSS attributes of an element?

    How to prevent inner text resizing in CSS Animation @keyframes?

    How to rotate an image with CSS style transform by an variable of degree?

    How to add an existing class to td in css file?

    CSS How to make image fluid extending only to one side of browser, aligned with centered content?

    How to override CSS style for a specific element if its parent has a specific class

    div under div - dont know how to do this

    how to make a floating div disappear for smaller screens?

    How to close the menu after click third layer menu item

    How to make a vector background image in css instead of using jpg or png

    Show outlines around divs in a web-based HTML editor, a la Dreamweaver and other editors

    How to create custom CSS “on the fly” based on account settings in a Django site?

    How to solve CSS dropdown border error?

    Flexbox: how to get divs to fill up 100% of the container width without wrapping?

    How to alter ionic's nav-bar size?

    In CSS, how to create automatic section numbering only when there are multiple sections?

    How to make a key shape using css?

    How to preload large css and javascript files in vanilla javascript