Jump to content

[ solved ] lining up social media icons in a block


Recommended Posts

Hi,

 

I have this piece of code for lining up vertically the socila media icons in a left column block.

 

<center><a href="http://pinterest.com/byxanthe/" target="_blank"><img src="/winkel/modules/wcontent1/imgs/pinterest.png" alt="Pinterest"/></a></center>

<center><a href="http://www.linkedin.com/pub/byxanthe-sieraden/4b/335/a15/" target="_blank">

<img src="/winkel/modules/wcontent1/imgs/linkedin.png" alt="LinkedIn"/></a><center>

<center><a href="http://www.facebook.com/pages/ByXanthe/173409289432313/" target="_blank">

<img src="/winkel/modules/wcontent1/imgs/fb_1.png" alt="Facebook"/></a></center>

<center><a href="http://twitter.com/#!/Byxanthe/" target="_blank">

<img src="/winkel/modules/wcontent1/imgs/twitter_1.png" alt="Twitter"/></a></center>

 

Now i want to line them up horizontal....but cant get it to work.

any help appreciated

Edited by verhoej (see edit history)
Link to comment
Share on other sites

It can be neater than this but try:

 

 

<ul id="social">

<li><a href="http://pinterest.com/byxanthe/" target="_blank"><img src="/winkel/modules/wcontent1/imgs/pinterest.png" alt="Pinterest"/></a></li>

<li><a href="http://www.linkedin.com/pub/byxanthe-sieraden/4b/335/a15/" target="_blank">

<img src="/winkel/modules/wcontent1/imgs/linkedin.png" alt="LinkedIn"/></a></li>

<li><a href="http://www.facebook.com/pages/ByXanthe/173409289432313/" target="_blank">

<img src="/winkel/modules/wcontent1/imgs/fb_1.png" alt="Facebook"/></a></li>

<li><a href="http://twitter.com/#!/Byxanthe/" target="_blank">

<img src="/winkel/modules/wcontent1/imgs/twitter_1.png" alt="Twitter"/></a></li>

</ul>

 

 

CSS

#social li

{

display: inline;

list-style-type: none;

padding-right: 20px;

}

 

Obviously changing the right padding will alter the spcaing if one gets pushed onto the next line try to change the spcaing to 10px or less

Edited by cocothecat (see edit history)
Link to comment
Share on other sites

  • 1 year later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...