White Space at Top of Page Issue with WordPress Theme

I am using a Pofo Child theme for a WordPress website and on the desktop view, there is extra blank white space at the top of all my pages. When I went in and edited the margin in customized css, the white space was corrected on the desktop, but then the mobile was messed up.

Is there a way to only edit the margin for the desktop view, or what is another solution for this issue?

Thank you!

Hi

to write css only for desktop you can use this:

@media screen and (min-width: 768px) {
YOUR DESKTOP CSS HERE
}

May be in your case 768px will be 992px

Thanks

Thank you so much!
Do you have a suggestion for what the desktop CSS should be? I tried:

margin-top: 0px
!important;

When I put that code in, I get an error "Expected a ‘FUNCTION’ or ‘IDENT’ after colon
Also, I’m getting an error “Expected RBRACE”

Hi

Your css should have be this format:

@media screen and (min-width: 768px) {
.YOUR-REQUIRED-CLASS{
margin-top: 0px !important;
}
}

.YOUR-REQUIRED-CLASS need to replace with your design required div/section class/id

Thanks

This worked perfectly. Thank you!!

1 Like