Question

I have some kind of an issue:

I have a footer, with text and a Facebook image in it. For some reason I can't get the facebook icon directly to the right of the text.

Can someone please help me?

here is a link to jsfiddle

    <div id="footerwrap">
    <div id="footer">
        <div class="copyright">2014 - 2015 <span class="bar">|</span>www.website.com<span class="bar">|</span>Created by <a href="http://www.website.com" target="_blank">website</a><span class="bar">|</span>
            <ul>
                <li><a href="https://www.facebook.com" target="_blank" title="Facebook"><img src="http://www.commuwise.nl/wp-content/uploads/facebook.png" /></a>
                </li>
            </ul>Like us on Facebook!</div>
    </div>
</div>

And the css:

    #footerwrap {
    width: 1000px;
    float: left;
    margin: 0 auto;
    clear: both;
}
#footer {
    height: 30px;
    background: #33FF66;
    border-radius: 10px;
    border: 1px solid #1feb52;
    margin: 0px auto;
    text-align: center;
    color:#FFF;
}
#footer a {
    color:#FFF;
    text-decoration:none;
}
#footer a:hover {
    color:#FFF;
    text-decoration:underline;
}
#footer a:visited {
    color:#FFF;
    text-decoration:underline;
}
.bar {
    font-size: 15px;
}
#footer .copyright ul {
    list-style: none;
    margin: 0px 0px 0px;
    padding: 3px;
    float:right;
    margin-left:5px;
}
#footer .copyright img {
    border: 0px;
}
#footer .copyright {
    color: #fff;
    line-height: 32px;
    margin-left: 5px;
    margin-top: 0px;
    text-align: center;
}

Thanks!! Best regards

Was it helpful?

Solution

Here is a js.fiddle: http://jsfiddle.net/DSrn4/1/

In your css code,

#footer .copyright ul {
    list-style: none;
    margin: 0px 0px 0px;
    padding: 3px;
    display:inline-block;
    margin-left:5px;
}

removed: float:right; added: display:inline-block;

OTHER TIPS

Try this jsfiddle

<div id="footerwrap">
   <div id="footer">
        <div class="copyright">
    2014 - 2015 <span class="bar">|</span>www.website.com<span class="bar">|</span>Created by <a href="http://www.website.com" target="_blank">website</a><span class="bar">|</span>Like us on Facebook!<a href="https://www.facebook.com" target="_blank" title="Facebook"><img src="http://www.commuwise.nl/wp-content/uploads/facebook.png" /></a>

        </div>
    </div>
</div>

Is this how you are wanting it to be? Working Fiddle

#footer .copyright ul {
list-style: none;
margin: 0px 5px;
padding:0 3px;
float:right;
}
#footer .copyright ul li a{
display:block;
margin:0;
padding:0;
}
#footer .copyright ul li a img{
display:inline-block;
vertical-align:top;
padding-top:3px;
}
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top