# Spacing Before and After Images within Text

**URL:** https://pressbooks.community/t/spacing-before-and-after-images-within-text/1575
**Category:** Using Pressbooks
**Created:** [January 11, 2021, 7:51pm UTC](https://pressbooks.community/t/spacing-before-and-after-images-within-text/1575 "2021-01-11T19:51:12Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![DrJRN](https://pressbooks.community/user_avatar/pressbooks.community/drjrn/32/1128_2.png) [@DrJRN](https://pressbooks.community/u/DrJRN)
#### Post date: [January 11, 2021, 7:51pm UTC](https://pressbooks.community/t/spacing-before-and-after-images-within-text/1575/1 "2021-01-11T19:51:12Z")

</div>

I cannot seem to figure out how to always maintain equal spacing before and after images within text. Sometimes the space above the image is double-spaced but single-spaced below, sometimes the space under the image is double-spaced bur single-spaced above and sometimes the space above and below the image is single-spaced. How do I maintain or create equal spacing above and below images within text?

---

<div class="post-metadata">

### Author: ![SteelWagstaff](https://pressbooks.community/user_avatar/pressbooks.community/steelwagstaff/32/1280_2.png) [@SteelWagstaff](https://pressbooks.community/u/SteelWagstaff)
#### Post date: [January 12, 2021, 2:51pm UTC](https://pressbooks.community/t/spacing-before-and-after-images-within-text/1575/2 "2021-01-12T14:51:27Z")

</div>

Hi @DrJRN, can you provide a URL for your book and a screenshot or two showing the problems you’re encountering? My guess is that this issue is probably fixable with a few CSS tweaks ([https://guide.pressbooks.com/chapter/customizing-your-exports-with-custom-styles/](https://guide.pressbooks.com/chapter/customizing-your-exports-with-custom-styles/)), but can’t know for sure without seeing the problem in greater detail.

---

<div class="post-metadata">

### Author: ![DrJRN](https://pressbooks.community/user_avatar/pressbooks.community/drjrn/32/1128_2.png) [@DrJRN](https://pressbooks.community/u/DrJRN)
#### Post date: [January 12, 2021, 3:29pm UTC](https://pressbooks.community/t/spacing-before-and-after-images-within-text/1575/3 "2021-01-12T15:29:15Z")

</div>

Thanks Steel. Nice to talk to you outside of Twitter.

The URL to the book is [https://ourstory.pressbooks.com/](https://ourstory.pressbooks.com/). Here is the [chapter](https://ourstory.pressbooks.com/chapter/the-great-war-part-1/) that is particularly vexing.

I have attached a screenshot. You can see how the text goes from a column-like format to a horizontal format, with all images showing up on the far left. I hope the screenshot is helpful.

Thanks again.

 ![OurStoryGreatWarPart1](https://pressbooks.community/uploads/default/original/2X/9/968006487282211e145c5778dd25118a93e499d8.png)

---

<div class="post-metadata">

### Author: ![SteelWagstaff](https://pressbooks.community/user_avatar/pressbooks.community/steelwagstaff/32/1280_2.png) [@SteelWagstaff](https://pressbooks.community/u/SteelWagstaff)
#### Post date: [January 12, 2021, 5:02pm UTC](https://pressbooks.community/t/spacing-before-and-after-images-within-text/1575/4 "2021-01-12T17:02:30Z")

</div>

Hi Jim – I went in and looked at the chapter in question – it looks like the content you flagged is broken because of a HTML error in the footnote just preceding it that’s causing the container `div` to be closed too early. When I go into the HTML editor, this is what I see:

```auto
[footnote]Multiple sources to include A Study in Jazz Historiography: "The New Grove Dictionary of Jazz,"
<div class="contrib">by Eileen Southern, <cite>College Music Symposium, </cite>Vol. 29 (1989), pp. 123-133[/footnote]</div>

```

The problem here is that `</div>` element sitting on its own outside of the footnote shortcode. I would fix by either removing the `<div class="contrib">` element and its closing tag entirely, or moving the closing tag inside of the footnote (i.e. just before the `[/footnote]` shortcode close tag.

---

<div class="post-metadata">

### Author: ![DrJRN](https://pressbooks.community/user_avatar/pressbooks.community/drjrn/32/1128_2.png) [@DrJRN](https://pressbooks.community/u/DrJRN)
#### Post date: [January 22, 2021, 5:48pm UTC](https://pressbooks.community/t/spacing-before-and-after-images-within-text/1575/5 "2021-01-22T17:48:07Z")

</div>

Oh thank you!! I never would have figured that out. Thank you.
