I'm trying to add CSS for mobile and it won't stick

chrismendla
5 Posts
chrismendla posted this 05 October 2020
Ask a Question

I am trying to add CSS for the responsive/phone version of my site.

As it is now, the elements overflow the right/left sides of the device in portrait mode.

I tried the selecting the phone icon in Nicepage and adding the following CSS.

@media (max-width: 575px) h2:not(.u-subtitle) {
font-weight: 400;
font-size: 2.25rem;
line-height: 1.1;
margin-top: 20px;
margin-bottom: 20px;
margin-right: 20px;

I also tried setting all of the elements to margins of 20 right and 20 left in the phone mode in nicepage.

I also tried adding custom CSS in Wordpress (Latest version)

I've been messing with that a bit but here is the latest

.wp-block-image img

{
height: auto;
}
.webpexpress-processed img
{
height: auto;
}

pre.wp-block-code {

margin-left: 8% !important;

margin-right: 10% !important;
}

pre.wp-block-preformatted {

margin-left: 8% !important;

margin-right: 10% !important;
}

@media (max-width: 575px)
h2, h2:not(.u-subtitle) {

margin-left 20px !important;
margin-right 20px !important;
padding-left 20px !important;
padding-right 20px !important;

}

p, p:not(.u-text-variant) {

margin-left 20px !important;
margin-right 20px !important;

}

It seems that no matter what I do, if I inspect the code, the margin changes are not there in the CSS. I can manually change the CSS in settings and it works but I can't make the CSS stick.

The post in question is https://www.chrismendlascorner.com/2020/10/05/add-a-battery-backup-to-your-garage-door-opener/ but it seems all posts on that site have the same issue.

I've attached my exported zip from nicepage.

I'd appreciate any ideas.

Thanks

Chris Mendla

I am trying to add CSS for the responsive/phone version of my site. As it is now, the elements overflow the right/left sides of the device in portrait mode. I tried the selecting the phone icon in Nicepage and adding the following CSS. > @media (max-width: 575px) h2:not(.u-subtitle) { > font-weight: 400; > font-size: 2.25rem; > line-height: 1.1; > margin-top: 20px; > margin-bottom: 20px; > margin-right: 20px; I also tried setting all of the elements to margins of 20 right and 20 left in the phone mode in nicepage. I also tried adding custom CSS in Wordpress (Latest version) I've been messing with that a bit but here is the latest .wp-block-image img { height: auto; } .webpexpress-processed img { height: auto; } pre.wp-block-code { margin-left: 8% !important; margin-right: 10% !important; } pre.wp-block-preformatted { margin-left: 8% !important; margin-right: 10% !important; } @media (max-width: 575px) h2, h2:not(.u-subtitle) { margin-left 20px !important; margin-right 20px !important; padding-left 20px !important; padding-right 20px !important; } p, p:not(.u-text-variant) { margin-left 20px !important; margin-right 20px !important; } It seems that no matter what I do, if I inspect the code, the margin changes are not there in the CSS. I can manually change the CSS in settings and it works but I can't make the CSS stick. The post in question is https://www.chrismendlascorner.com/2020/10/05/add-a-battery-backup-to-your-garage-door-opener/ but it seems all posts on that site have the same issue. I've attached my exported zip from nicepage. I'd appreciate any ideas. Thanks Chris Mendla
Vote to pay developers attention to this features or issue.
1 Reply
Order By: Standard | Newest
Support Team
Support Team posted this 06 October 2020

Hi Christopher,

Looks like you have some cache plug-in on the site, please try to disable it, clear the site cache and check if the code is saved. Then you can enable the plug-in again.

...................................................
Sincerely,
Hella
Nicepage Support Team

Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1
Follow us on Facebook: http://facebook.com/nicepageapp

Hi Christopher, Looks like you have some cache plug-in on the site, please try to disable it, clear the site cache and check if the code is saved. Then you can enable the plug-in again. ................................................... Sincerely, Hella Nicepage Support Team Please subscribe to our YouTube channel: http://youtube.com/nicepage?sub_confirmation=1 Follow us on Facebook: http://facebook.com/nicepageapp
You must log in or register to leave comments