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 your CSS experience to similar task.
Thank you in advance!
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 your CSS experience to similar task.
Thank you in advance!
Check this out.
Fiddle: http://jsfiddle.net/tbj3hsmL/
HTML:
<div class="footer">
<img src="http://placehold.it/25x25" />
<span class="text">Footer Text</span>
</div>
CSS:
.footer {
padding: 10px;
background: #ddd;
text-align: center;
}
.footer img {
vertical-align: middle;
}
.footer .text {
margin-left: 10px;
}
Just make a div of what you want to center and in the css do like this:
margin:0;