• Resolved Rassi

    (@rassi)


    I’m trying to put some blank horizontal space around images in my blog posts. In the HTML editor, the spacing shows correctly aftre adding the hspace=”10″ (or whatever) to the img tag in the HTML. However, when I publish the entry and visit the page, the spacing is missing. I think there might be something in the CSS that’s over-riding it, but I really don’t know much about CSS so I’m not sure how to fix this.

    My blog is at https://www.the-daily-poll.com.

    The theme I’m using is PressRow 1.2 (home page is at https://www.findcreditcards.org/pressrow/ )

    Any help is appreciated.

Viewing 6 replies - 1 through 6 (of 6 total)
  • instead of using html in the post, try adding some margin to images in your CSS.

    img {margin: 10px; border: none}

    Thread Starter Rassi

    (@rassi)

    Sorry for sounding dumb, but I told you I was a CSS novice. I’m guessing that goes in the style.css file, right? Where in particular?

    Thanks in advance…

    In the “content style” section of your CSS file you already have everything! (e.g. entry img left… etc.)
    You just have to apply those classes to your images in the posts.

    Thread Starter Rassi

    (@rassi)

    Thanks for being patient with me. I think these are the relevant sections:

    .entry img.left { padding: 6px; margin: 0 10px 5px 0; background: #f5f5f5; border: 1px solid #bbb; float: left; }

    .entry img.left_off { margin: 0 10px 5px 0; float: left; }

    Now, as you know I don’t know very much how to use the CSS, so I have two questions.

    First, what is the tag to use – “.entry img.left” or “img.left”?

    Secondly, how is the tag used? Is it like:

    `<img.left src=”blahblah”> ???

    Thanks in advance for your patience….

    Probably something like this:
    <img src="whatever.jpg" class="entry_img left" alt="..." />

    Everything in the style.css starting with a dot [.] is a “class”.
    If starts with a [#] – a it’s an “id”.

    More: https://www.w3schools.com/css/default.asp

    Thread Starter Rassi

    (@rassi)

    Thank you very much. I think that will do it.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Losing hspace=”xx” in blog post’ is closed to new replies.