Kevin Waldron
asked 1 year ago

Hello,

I guess when people ask questions here it’s because they have been tearing their hair out… at least it is in my case (well, my head’s shaven, but you get my drift)… I’m new to WordPress and css.

Having trawled forums, searched Google and done much tinkering, I’m unable to achieve the following:

On this wordpress page (http://payspreesniper.com/articles/earn-money), I pull in a simple webpage with an iframe. Seeing as this webpage is predominantly white, I’d like to change the wordpress page’s background to white, but it appears I can only change the actual background area with the custom css via a child theme and not the content area (don’t want that dark grey surround).

Where I’m at to date..

.page-id-171 #main {
background: #FFFFFF;
}

.page-id-171 #container {
background: #FFFFFF;
}

.page-id-171 .clearfix {
background: #FFFFFF;
}

Actually, I not only wanted to change the colour of the content area, but I also wanted to move the content area up if possible and remove the scroll bar because I’m sure the full content of the page I’m pulling in with the iframe can just about fit.

I’m assuming that either I’ve not chosen the right ID or class to edit or there it’s being overridden by the WallPress parent theme (look at me sounding like I know what I’m talking about).

Either way, I’m stuck being unable to do it, but still believing it’s possible to those with even a moderate skill level that I am yet to attain.

Any help/advice would certainly be appreciated.

Thank in advance,

Kevin

1 Answers
Dominic
answered 1 year ago

You can add the following code to the style.css file:

.page-id-171 .item .item-inner {
    background: #fff;
    border: 0 !important;
}
.page-id-171 {
    background: #fff;
}

.page-id-171 .item-content iframe {
    max-width: 100%;
    position: fixed;
    background: #fff;
    top: 15px;
    margin: 0;
}

Hope this helps !

kevin_waldron
replied 1 year ago

Hi Dominic,

Thanks for the prompt response, I’ll give that a whirl and let you know how I get on.

Regards,

Kevin

kevin_waldron
replied 1 year ago

The man’s a genius (Dominic)… I guess that’s your job, but nevertheless many thanks, that’s just the ticket.

Obviously had to adjust "top" margin to align the iframe exactly where I needed it. And I learned something into the bargain (saw one of my errors, in missing the ".item" class).

Appreciate the rapid resolution!

Thanks again,

Kevin

dominic
replied 1 year ago

I’m happy and glad to help you. If you have any issue or question, you can let us know, we will check and help you.

Powered by DW Question & Answer Pro

Access years of experience in WordPress; Collaborate with professionals trusted by tens of thousands of people across the world.

Sign Up Today