Title: Adding padding to icon in header.php
Last modified: August 21, 2016

---

# Adding padding to icon in header.php

 *  Resolved [jennyfogarty](https://wordpress.org/support/users/jennyfogarty/)
 * (@jennyfogarty)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/adding-padding-to-icon-in-headerphp/)
 * Hi Guys,
 * I am using a theme where there are Social Network Icons. (Shortcoded)
 * I am trying to place them in my header but the theme doesnt accomadate them in
   the header.
 * I managed to get them into the header by using some code in the header.php.
 * <?php echo do_shortcode(‘[social_links facebook=”test”]’); ?>
 * What I am trying to do now is figure what code I need to edit/add to move the
   icons to the right and up towards the top of the header.
 * Do I need to add html to the php?
 * If so, could anyone give me heads up on how and where I should place it?
 * I really appreciate it…
 * Jen

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

 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/adding-padding-to-icon-in-headerphp/#post-4470139)
 * This is best done with CSS. If you want each icon used to have unique CSS, wrap
   it in a div like this:
 *     ```
       <div class="sm_icon_1"><?php echo do_shortcode('[social_links facebook="test"]'); ?></div>
       ```
   
 * Example CSS:
 *     ```
       .sm_icon_1 {
       padding: 10px;
       margin:10px;
       }
       ```
   
 * Forum users cannot be more specific without a [link to your site](http://codex.wordpress.org/Forum_Welcome#Link_to_Your_Site).
 * Then add the class(es) and style them adding padding, margin, etc.
 * To discover what CSS is output by your theme and to add new styles, start with
   a a web inspection tool such as Firebug: [http://getfirebug.com/](http://getfirebug.com/),
   Chrome Inspect Element: [https://developers.google.com/chrome-developer-tools/](https://developers.google.com/chrome-developer-tools/)
   or Internet Explorer 9+ F12 Dev. Tools: [http://msdn.microsoft.com/en-us/library/dd565627(v=vs.85)](http://msdn.microsoft.com/en-us/library/dd565627(v=vs.85)).
   aspx#csstool
 * There are others.
 * When editing CSS, use a Child Theme
    [http://codex.wordpress.org/Child_Themes](http://codex.wordpress.org/Child_Themes)
   Custom CSS Plugin, or Theme provided custom CSS option. Edits to parent themes
   are lost on theme update.
 * Learn CSS: [http://www.w3schools.com/css/](http://www.w3schools.com/css/)
 *  Thread Starter [jennyfogarty](https://wordpress.org/support/users/jennyfogarty/)
 * (@jennyfogarty)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/adding-padding-to-icon-in-headerphp/#post-4470140)
 * Thank you so much for the speedy reply, I really appreciate it, I will try your
   suggestion now.
 * Again, thanks a million and Happy New Year!
 * Jenny
    🙂
 *  Thread Starter [jennyfogarty](https://wordpress.org/support/users/jennyfogarty/)
 * (@jennyfogarty)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/adding-padding-to-icon-in-headerphp/#post-4470146)
 * It worked perfectly.
 * Thank you so so much for that! it saved me hours of searching online!
 * Jen
    : )
 *  [Pioneer Web Design](https://wordpress.org/support/users/swansonphotos/)
 * (@swansonphotos)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/adding-padding-to-icon-in-headerphp/#post-4470197)
 * Glad to help. Please mark post as resolved if so.
 *  Thread Starter [jennyfogarty](https://wordpress.org/support/users/jennyfogarty/)
 * (@jennyfogarty)
 * [12 years, 5 months ago](https://wordpress.org/support/topic/adding-padding-to-icon-in-headerphp/#post-4470211)
 * Sure thing.

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

The topic ‘Adding padding to icon in header.php’ is closed to new replies.

## Tags

 * [header](https://wordpress.org/support/topic-tag/header/)
 * [padding](https://wordpress.org/support/topic-tag/padding/)
 * [php](https://wordpress.org/support/topic-tag/php/)
 * [styling](https://wordpress.org/support/topic-tag/styling/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 5 replies
 * 2 participants
 * Last reply from: [jennyfogarty](https://wordpress.org/support/users/jennyfogarty/)
 * Last activity: [12 years, 5 months ago](https://wordpress.org/support/topic/adding-padding-to-icon-in-headerphp/#post-4470211)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
