Title: Adding padding to this code?
Last modified: August 19, 2016

---

# Adding padding to this code?

 *  Resolved [iuchewie](https://wordpress.org/support/users/iuchewie/)
 * (@iuchewie)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/)
 * Is there a way to add padding to this code or does it need to be done via CSS?
 * `<?php the_post(); userphoto_the_author_photo('', '', array(align => 'right',
   border =>'1')); rewind_posts(); ?>`
 * Thanks in advance.
 * chewie

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

 *  [peiqinglong](https://wordpress.org/support/users/peiqinglong/)
 * (@peiqinglong)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/#post-832049)
 * Where exactly would you like the padding? You could always use the span style
   and do it inline.
 *  Thread Starter [iuchewie](https://wordpress.org/support/users/iuchewie/)
 * (@iuchewie)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/#post-832063)
 * The image that this is displaying is being shown on this page – [http://talkflop.com/blog/?author=2](http://talkflop.com/blog/?author=2)
 * I’d like to get some additional padding around the image so the words don’t bump
   up right against the image.
 * chewie
 *  [peiqinglong](https://wordpress.org/support/users/peiqinglong/)
 * (@peiqinglong)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/#post-832077)
 * See if this will work for you:
 * `<?php the_post(); userphoto_the_author_photo('', '', array(align => 'right',
   border =>'1', class =>'author-image')); rewind_posts(); ?>`
 * and add `img .author-image {padding: 5px; }` to your stylesheet.
 * or try this:
 * `<?php the_post(); echo "<span style=\"padding:5px;\">"; userphoto_the_author_photo('','',
   array(align => 'right', border =>'1')); echo "</span>"; rewind_posts(); ?>`
 *  Thread Starter [iuchewie](https://wordpress.org/support/users/iuchewie/)
 * (@iuchewie)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/#post-832147)
 * unfortunately neither of those worked…
 * the first option broke the author.php page and the second option had no effect.
 * thanks for trying though!
 *  [peiqinglong](https://wordpress.org/support/users/peiqinglong/)
 * (@peiqinglong)
 * [17 years, 10 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/#post-832151)
 * You could add this in your stylesheet:
 * `#content img {padding: 5px; }`, but this will give any images in the content
   a padding of 5px…
 *  Thread Starter [iuchewie](https://wordpress.org/support/users/iuchewie/)
 * (@iuchewie)
 * [17 years, 9 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/#post-832251)
 * finally figured this out…
 * `<?php the_post(); userphoto_the_author_photo('', '', array(vspace => '5', hspace
   => '5', align => 'right', border =>'1')); rewind_posts(); ?>`

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

The topic ‘Adding padding to this code?’ is closed to new replies.

## Tags

 * [author](https://wordpress.org/support/topic-tag/author/)
 * [code](https://wordpress.org/support/topic-tag/code/)
 * [padding](https://wordpress.org/support/topic-tag/padding/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 6 replies
 * 2 participants
 * Last reply from: [iuchewie](https://wordpress.org/support/users/iuchewie/)
 * Last activity: [17 years, 9 months ago](https://wordpress.org/support/topic/adding-padding-to-this-code/#post-832251)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
