Title: CSS positioning
Last modified: August 22, 2016

---

# CSS positioning

 *  Resolved [aewanishan](https://wordpress.org/support/users/aewanishan/)
 * (@aewanishan)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/css-positioning-1/)
 * Hello!
    I am having trouble positioning my social media icons on my homepage 
   [http://www.spark-le.com](http://www.spark-le.com) I have been able to get the
   icons to function properly, but I would like them placed in the top right horizontally
   side by side….
 * Below is what I have on my ‘header.php’:
 *     ```
       <div id= header_icons>
   
       		<a href="https://www.facebook.com/andrea.ewanishan">
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Facebook-icon.png width=”40px” /></a>
       		<a href="http://instagram.com/dreaewanishan" >
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Instagram-icon.png width=”40px” /></a>
       		<a href="https://twitter.com/dreaewanishan" >
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Twitter-icon.png width=”40px” /></a>
       		<a href="http://www.pinterest.com/dreaewanishan/">
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Pinterest-Copyrighted-icon.png width=”40px” /></a>
       ```
   
 * I also added #header_icons to my ‘style.css’ and played around with different
   positioning wording I found online, however NOTHING seems to be working……
 * Someone please help!!!
    Thank you 🙂

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

 *  [Justin](https://wordpress.org/support/users/click245/)
 * (@click245)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/css-positioning-1/#post-5246507)
 * Hi aewanishan,
 * First off, one problem I saw was you hadn’t closed the div tag, that might be
   why your fixes in style.css weren’t working.
 * Try this, close the div tag, like this:
 *     ```
       <div id= header_icons>
   
       		<a href="https://www.facebook.com/andrea.ewanishan">
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Facebook-icon.png width=”40px” /></a>
       		<a href="http://instagram.com/dreaewanishan" >
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Instagram-icon.png width=”40px” /></a>
       		<a href="https://twitter.com/dreaewanishan" >
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Twitter-icon.png width=”40px” /></a>
       		<a href="http://www.pinterest.com/dreaewanishan/">
       		<img alt=”” src=http://www.spark-le.com/wp-content/uploads/2014/09/Logos-Pinterest-Copyrighted-icon.png width=”40px” /></a>
       </div>
       ```
   
 * Then add this to your css:
 *     ```
       #header_icons {
           margin: 10px 0 0 10px;
       }
       #header_icons a {
           float: left;
           padding-right: 10px;
       }
       #header_icons a:after {
           clear: both;
       }
       ```
   
 * Hopefully that solves your problems!
 * Also its best to do these changes in a child theme, not sure if you are? If not
   then when you update this theme it will overwrite the changes you have made.
 *  [CMSHelpLive](https://wordpress.org/support/users/cmshelplivecom/)
 * (@cmshelplivecom)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/css-positioning-1/#post-5246509)
 * add the following code in your stylesheet:
 *     ```
       .header_icons a img{
       float:right!important;
       }
       ```
   
 *  Thread Starter [aewanishan](https://wordpress.org/support/users/aewanishan/)
 * (@aewanishan)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/css-positioning-1/#post-5246536)
 * Thank you SO much!!
    Yes the above helped and it is exactly how I had wanted 
   it.
 * Thank you both!! 🙂
    I will also do a child theme as I hadn’t before and that
   sounds like a good idea!
 *  [Justin](https://wordpress.org/support/users/click245/)
 * (@click245)
 * [11 years, 8 months ago](https://wordpress.org/support/topic/css-positioning-1/#post-5246539)
 * Sorry I didn’t read that properly! Missed the part where you said top right :/
   Glad it helped 😉

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

The topic ‘CSS positioning’ is closed to new replies.

## Tags

 * [css](https://wordpress.org/support/topic-tag/css/)
 * [header](https://wordpress.org/support/topic-tag/header/)
 * [homepage](https://wordpress.org/support/topic-tag/homepage/)
 * [positioning](https://wordpress.org/support/topic-tag/positioning/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 4 replies
 * 3 participants
 * Last reply from: [Justin](https://wordpress.org/support/users/click245/)
 * Last activity: [11 years, 8 months ago](https://wordpress.org/support/topic/css-positioning-1/#post-5246539)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
