There are a few issues with your CSS. You did not close your <ul>
element and the width of the <ul>
is so small that it is squeezing the <li>
elements into a single column. You have also mixed up your CSS selector syntax. Instead of .socialicons ul
it looks like what you want is .socialicons
.
There are really only rare cases that you should use descendant selectors. CSS is parsed from right to left. See here for more about this: http://css-tricks.com/efficiently-rendering-css/
http://cssdesk.com/D8xrT
HTML
<div class="social">
<ul class="socialicons">
<li id="facebook"><a href="#"><img alt="Facebook" src="http://placekitten.com/g/24/50" width="24" height="50" /></a></li>
<li id="twitter"><a href="#"><img alt="Twitter" src="http://placekitten.com/g/30/50" width="30" height="50" /></a></li>
</ul>
</div>
CSS
.social {
position: absolute;
right: 1.5%;
top: 5px;
width: 75px;
}
.socialicons {
list-style: none;
display: inline;
padding-left: 0;
padding-bottom: 0;
}
.socialicons li {
display: inline-block;
padding: 0.3em;
float:left;
}
.socialicons ol, ul {
list-style: none;
display: inline-block;
}
.socialicons ul a {
display: inline-block;
text-decoration: none;
}
.socialicons img {
max-width: 50%;
height: auto;
}