Change through @media doesn’t work
-
Hello. I want center header and footer image. I tried this code on header and footer image, but it doesn’t work. T tried deskop float:left and mobile float:right, but too doesn’t work. Can you please help me?
This is code in styles.css:
/* deskop left */ .stred-mobile { float: left; } /* when screen is less than 719px wide change to mobile version to center*/ @media only screen and (max-width: 719px) { .stred-mobile { float: none; margin: auto }
This is code in header.php:
<?php if ( get_header_image() ) : ?> <div class="site-header"> <a href="<?php echo esc_url( home_url('/') ); ?>" rel="home"> <img class="site-image stred-mobile" src="<?php header_image(); ?>" alt="<?php echo esc_attr( get_bloginfo( 'name', 'display' ) ); ?>"> </a> </div> <?php endif; ?>
The page I need help with: [log in to see the link]
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Change through @media doesn’t work’ is closed to new replies.