Sergiu Costas Sergiu Costas - 1 year ago 30
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!


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;