Title: Spaces in Posts
Last modified: August 19, 2016

---

# Spaces in Posts

 *  Resolved [smartyd](https://wordpress.org/support/users/smartyd/)
 * (@smartyd)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/)
 * I have a couple spacing issues I haven’t been able to fix on my blog [http://www.theamazingagingmind.com](http://www.theamazingagingmind.com):
   
   In the post “stigma-tazing”, I uploaded an image and wanted it to have a border
   that hugged the image. I did get a border, but it fits around the whole space
   designated for the image, not around the image itelf. How do I outline the image
   only? The CSS code currently reads:
 * .postcontent img {
    border: 3px solid #efefef; padding: 0px 0px 10px 0px; }
 * Next, I want to eliminate the excessive space between the post title and the 
   post content. The reason I have this space I believe is that I had to include
   some javascript in the “head” section of the post. The code creates the pop-up
   you see when you mouse over the word “taze” at the bottom of the post. I tried
   putting this CSS in the stylesheet, but it didn’t work. The only place I could
   get it to work was to put it in the post, but its presence creates this extra
   space. I suspect I should put the code in the functions.php, but then what to
   name the function, and where to call up that name elsewhere? I’m a complete neophite
   at php!
    Can anyone please help? Thanks Marty

Viewing 7 replies - 1 through 7 (of 7 total)

 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475643)
 * the image has a padding-bottom of 10px, and the border will go around that as
   padding counts as part of the element; you could replace it with margin-bottom.
 * the styles do not cause any space.
    as far as i can see in your html code (from
   the browser) you have an we>rd paragraph just before these styles `<p><head></
   p>` and another weird paragraph with a linebreak at the beginning of the paragraph
   before the image `<p><body><img class=...`
 * check and repair this in the post editor, html setting.
 *  Thread Starter [smartyd](https://wordpress.org/support/users/smartyd/)
 * (@smartyd)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475727)
 * Hm. I opened the editor in html setting, and this is how it reads on my screen.
   First line:
    <head><style type=’text/css’> …and the other line reads: </style
   ><body><img class=”alignleft”
 * The <p> must be added automatically by WordPress (it’s not visible in the editor),
   and I don’t know how to take them out. I tried looking for the file via ftp, 
   but can’t locate it on the host to edit it. Where do posts reside on Bluehost?
 * Thanks!
 *  Thread Starter [smartyd](https://wordpress.org/support/users/smartyd/)
 * (@smartyd)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475730)
 * Also, in the image, I added the 10px at the bottom to give the image a vertical
   look. The image is actually a lot skinnier than the outline, but the outline 
   doesn’t hug the right and left sides of the image even though I have 0px padding
   left and right. Argh! Can I put -10px?
 *  Thread Starter [smartyd](https://wordpress.org/support/users/smartyd/)
 * (@smartyd)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475780)
 * Finally found a solution to the spaces at the top of the post.
    I had to go into
   the stylesheet and change the spacing before the post to zero, then add spacing
   after the postdate to 18px. For some reason, that’s the only combo that worked.
   Now, to find a solution to the frame around the image…
 *  [Michael](https://wordpress.org/support/users/alchymyth/)
 * (@alchymyth)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475794)
 * > The image is actually a lot skinnier than the outline
 * actually, the image (as the thumbnail) is 150px * 150px; maybe the original image
   was narrower, but the one you are using in the post is square.
    it might be possible
   to change something in the thumbnail settings(?)
 *     ```
       <head><style type='text/css'>
       ...and the other line reads:
       </style><body><img class="al..
       ```
   
 * if the p tags are added by wordpress, remove at least the `<head>` and `<body
   >` because there are causing invalid code where they are; the styles in general
   also are not valid in this position.
    [validation ](http://validator.w3.org/check?uri=http%3A%2F%2Fwww.theamazingagingmind.com%2F&charset=%28detect+automatically%29&doctype=Inline&group=0)
   errors.
 *  Thread Starter [smartyd](https://wordpress.org/support/users/smartyd/)
 * (@smartyd)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475843)
 * Thanks, alchymyth,
    I changed the image altogether, and now the border hugs the
   image. But I still need to know where I should put the javascript I used on the
   page. I’d like to use it in all posts (or have the option to), but there has 
   to be a way to put it in the stylesheet or function.php so I don’t have to paste
   it into the post itself. I tried putting the javascript into the stylesheet with
   no success. Can anyone tell me where to put this css code? In Blogger, I just
   put it in the head section of the main html page (see [http://traveling-family.blogspot.com](http://traveling-family.blogspot.com)),
   but am lost in this wordpress theme. Thanks!!
 *  Thread Starter [smartyd](https://wordpress.org/support/users/smartyd/)
 * (@smartyd)
 * [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475904)
 * Everything solved. I put the css code into the stylesheet without the <style>
   </style> tags and all is fine!

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Spaces in Posts’ is closed to new replies.

## Tags

 * [Image border](https://wordpress.org/support/topic-tag/image-border/)
 * [post](https://wordpress.org/support/topic-tag/post/)
 * [post-content](https://wordpress.org/support/topic-tag/post-content/)
 * [Stylesheet](https://wordpress.org/support/topic-tag/stylesheet/)

 * 7 replies
 * 2 participants
 * Last reply from: [smartyd](https://wordpress.org/support/users/smartyd/)
 * Last activity: [16 years ago](https://wordpress.org/support/topic/spaces-in-posts-1/#post-1475904)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
