Sergiu Costas Sergiu Costas - 2 years ago 61
HTML Question

how to center perfectly image and text inline in the center of page

How to center perfectly both an Image and Text in the middle of container?

My task is to center in the footer side the logo and copyright text horizontally perfect. Please, share you CSS experience to similar task.

Thank you in advance!

Answer Source

Check this out.


<div class="footer">
    <img src="" />
    <span class="text">Footer Text</span>


.footer {
    padding: 10px;
    background: #ddd;
    text-align: center;
    .footer img {
        vertical-align: middle;
    .footer .text {
        margin-left: 10px;
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download