Cleanup theme – media queries not recognized
- This topic has 5 replies, 2 voices, and was last updated 1 year, 2 months ago by Grace Support.
-
AuthorPosts
-
September 6, 2023 at 7:33 pm #44306Lucius DouglasParticipant
I’m trying to adjust the height of the logo for mobile devices. However, it is not recognized by the theme.
URL: https://headlandcountryclub.org/
The code is:
@media only screen and (max-width: 980px) {
.visible-phone {display:block !important}
.visible-tablet,
.visible-desktop,
.visible-large {display:none !important}
.header-area,
.header-area .container,
.header-area .container .logo {
height: 250px !important;
max-height: 250px !important;
}
}However, inspect shows this:
.header-area, .header-area .container, .header-area .container .logo {
height: 80px;
max-height: 80px;
}
@media screen and (max-width: 980px)
.logo {
padding: 0 0 15px;
margin: 0 auto;
float: none;
}
@media screen and (max-width: 980px)
.logo {
position: relative;
width: auto;
margin: 0;
text-align: center;
top: auto;
max-width: none;
}
.logo {
float: left;
max-width: 22%;
text-align: left;
padding: 0;
top: 5px;
position: relative;
z-index: 999;
}I have the CSS in the Customize > Additional CSS. I was under the impression that this takes precedence over preceding CSS code. Am I wrong?
September 7, 2023 at 4:34 am #44309Grace SupportKeymasterHi,
To display the logo image fine on the mobile device
Go to the Appearance -> Customize -> Additional CSS
Add below css code.logo img { height: 90px !important; }
Regards
Grace ThemesSeptember 7, 2023 at 5:42 am #44324Lucius DouglasParticipantThe problem is NOT the image. The logo image on desktops/laptops has a height of 125px which is what I want it to be as it overlaps the navigation menu but on mobile it should be below the top bar and above the ‘header-contact-info’ DIV. This is the same height for all devices.
The problem is that the media query CSS code I have is not being recognized for the ‘logo’ DIV which has the image inside the DIV. It is set to 80px which means part of the text is intruding on the ‘logo’ DIV. That’s why I am attempting
@media screen and (max-width: 980px)
.visible-phone {display:block !important}
.visible-tablet,
.visible-desktop,
.visible-large {display:none !important}
.header-area .container .logo {
height: 125x !important;
max-height: 125px !important;
}However, the following CSS media query is recognized from the responsive.css file.
@media screen and (max-width: 980px)
.logo {
position: relative;
width: auto;
margin: 0;
text-align: center;
top: auto;
max-width: none;
}The media query is the same on both.
So why isn’t the code in the Appearance > Customize > Additional CSS recognized? It should take precedence.
I tested this on Chrome, Edge and Firefox on both my desktop with the browser reduced in width to a size of 485px as well as on my Samsung Galaxy S23 Ultra. None of the code is recognized.
FYI, I have cleared my
September 8, 2023 at 5:10 am #44340Grace SupportKeymasterHi,
Please send your website URL and WordPress admin login details at [email protected] so we can check and assist you quickly.
Regards
Grace ThemesSeptember 8, 2023 at 6:38 pm #44354Lucius DouglasParticipantI sent a password reset for your account.
September 9, 2023 at 4:53 am #44358Grace SupportKeymasterOk, thanks
-
AuthorPosts
- You must be logged in to reply to this topic.