Site logo

Archived topic

Can't get mobile header image centered

4 replies · Started by Karen on October 1, 2021

Viewing posts 1–5 of 5

https://karenshanley.com on mobile can't get header image centered. Here's CSS I currently have for this:

/* mobile header image */
@media (max-width: 768px) {
.navigation-branding, .site-logo.mobile-header-logo .mobile-header-image {
background-image: url(https://karenshanley.com/wp-content/uploads/2021/10/KS-mobile-75h.jpg) !important;
background-repeat: no-repeat;
background-color: #ffffff;
background-position: center center;
padding: 15px;
}
}

just checking notify by email box. Forgot to on 1st comment.

Hi there,

try changing your CSS to this:

@media (max-width: 768px) {
    .navigation-branding {
        background-image: url(https://karenshanley.com/wp-content/uploads/2021/10/KS-mobile-75h.jpg)!important;
        background-repeat: no-repeat;
        background-color: #fff;
        background-position: center center;
        padding: 10px 0;
        width: 100%;
        margin-left: 0;
    }
}

That did the trick. Thanks!

You're welcome

This archived topic is closed to new replies.