• Resolved aewanishan

    (@aewanishan)


    Hello!
    I am having trouble positioning my social media icons on my homepage
    https://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=https://www.spark-le.com/wp-content/uploads/2014/09/Logos-Facebook-icon.png width=”40px” /></a>
    		<a href="https://instagram.com/dreaewanishan" >
    		<img alt=”” src=https://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=https://www.spark-le.com/wp-content/uploads/2014/09/Logos-Twitter-icon.png width=”40px” /></a>
    		<a href="https://www.pinterest.com/dreaewanishan/">
    		<img alt=”” src=https://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)
  • 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=https://www.spark-le.com/wp-content/uploads/2014/09/Logos-Facebook-icon.png width=”40px” /></a>
    		<a href="https://instagram.com/dreaewanishan" >
    		<img alt=”” src=https://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=https://www.spark-le.com/wp-content/uploads/2014/09/Logos-Twitter-icon.png width=”40px” /></a>
    		<a href="https://www.pinterest.com/dreaewanishan/">
    		<img alt=”” src=https://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.

    add the following code in your stylesheet:

    .header_icons a img{
    float:right!important;
    }
    Thread Starter aewanishan

    (@aewanishan)

    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!

    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.