WordPress Tricks

How to show company logo side by side and vertically centered

If you want to show company logo side by side and vertically centered, i have shared the related html and css for your convenience

HTML Part To Show Company Logos side by side

<div id="logos">
 			<span> <img src="https://allaboutbasic.files.wordpress.com/2020/08/jw-logo.png"> </span>
			<span> <img src="https://allaboutbasic.files.wordpress.com/2020/08/printex-logo.png"> </span>
			<span> <img src="https://allaboutbasic.files.wordpress.com/2020/08/sitepod-logo.png"> </span>
			<span><img src="https://allaboutbasic.files.wordpress.com/2020/08/swingit-logo.png"></span>
</div>

CSS Part To Show Company Logos Side by Side

    #logos {
    box-shadow: 11px 1px 8px 2px #888888!IMPORTANT;
    padding: 10px;
    margin-bottom: 24px;
    margin-top: 1px;
    overflow: hidden;
    padding-top: 0px;
    padding-bottom: 0px;
}
   #logos span {
    min-height: 160px;
    max-height: 200px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-right: 1px solid #2b93d1;
    height: 200px;
    text-align: center;
    margin-right: 0px!important;
    padding-left: 50px;
    padding-right: 50px;
    width: 17%;
    float: left;
}
		
div#logos img {
    width: 100%;
}
@media (min-width: 320px) and (max-width: 668px) { 
div#logos img {
    width: auto !important;
    height: auto !IMPORTANT;
}
div#logos span {
    border: none !important;
    border-bottom: 1px solid #2b93d1 !IMPORTANT;
    display: block !IMPORTANT;
    width: auto !important;
    height: auto !IMPORTANT;
    overflow: hidden;
    max-height: 100%;
    min-height: auto;
    float: none;
    padding-top: 50px;
    padding-bottom: 50px;
}
div#logos {
    width: 100%;
}
}

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s