How To: Add Social Media Icons In Header
-
Hi all,
I’m attempting to add social media icons in my header at https://www.crozon.ca, but am having problems with placement of the icons and also my sidebar moving.
Placement: I would like the 5 social media icons to be aligned with my logo, spaced out evenly in the header.
I’ve added the following to my header.php:
<div id="header_icons"> <ul><li><a href="#" target="_blank" alt="Email"><img src="#" /></li> <li><a href="#" target="_blank" alt="RSS"><img src="#" /></li> <li><a href="#" target="_blank" alt="Twitter"><img src="#" /></li> <li><a href="#" target="_blank" alt="LinkedIn"><img src="#" /></li> <li><a href="#" target="_blank" alt="Facebook"><img src="#" /></li></ul> </div>
* – the # represents the actual link to the social media site and the path to the image
The in order to have them line up horizontally I added the following code to my style.css:
#header_icons li{ display:inline; }
The icons line up horizontally, however they are below the logo, which for some reason also moves the sidebar further down the page.
I’ve tried a number of variations to try to get the icons to be aligned with the logo, but for the life of me cannot figure it out. Please help.
Thanks in advance for the assistance.
Ps – I’m very new with css / php, so if there is a better way to set this up please let me know.
- The topic ‘How To: Add Social Media Icons In Header’ is closed to new replies.