Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Center area post/pages (http://forum.bytesforall.com/forumdisplay.php?f=32)
-   -   Background image to not show on one page (http://forum.bytesforall.com/showthread.php?t=23271)

skylang Aug 27, 2015 10:10 PM

Background image to not show on one page
 
I have a background image which shows on all pages. However, I want to make a landing page that doesn't show the background image so the visitor isn't distracted from the action they should take.

Is there any way to stop the background image from showing on one particular page?:confused:

juggledad Aug 28, 2015 02:53 AM

Sure create a css selector targeting that page and a CDs rule to not display it

skylang Aug 28, 2015 06:45 AM

Sounds good. What is the class of the background image? I couldn't find it.

Do I have it straight it would mean adding the following CSS insert:

body.page-id-XX div.[background-image-class] {display: none;}

juggledad Aug 28, 2015 06:59 AM

what's the url?

skylang Aug 28, 2015 07:10 AM

PM'd you with link to url

juggledad Aug 28, 2015 09:50 AM

HTML Code:

body.page page-id-225 {background-image: none;}

skylang Aug 28, 2015 10:21 AM

Great! Much appreciated.

skylang Aug 28, 2015 11:45 AM

Only thing is it's not working. And there's a strange anomaly - when I go to the page and "View Source" I see the css rule I added but with the final semi-colon stripped out. So of course the browser ignores it.

As it appears in CSS Inserts:
HTML Code:

body.page page-id-225 {background-image: none; }
As it appears in the source code of the page:
HTML Code:

body.page page-id-225{background-image:none}
Without the last semi-colon!! What gives?

skylang Aug 28, 2015 11:58 AM

It must have been a caching problem, because it is now correct.

However, the background image is still showing.

skylang Aug 28, 2015 12:33 PM

Okay, I got it to work. The css rule needs to be:

HTML Code:

body.page-id-225 {background-image: none;}

juggledad Aug 28, 2015 04:52 PM

Oops typo, glad you could dig in and figure it out!

striped aardvark Dec 8, 2015 12:22 PM

argh! this is driving me nuts. shouldn't this be the correct code to alter the background of an individual page? :

body.page-id-247 {background-color: #ffffff;}

what am i doing wrong!?

http://www.sizzlingexpress.ca/test/

striped aardvark Dec 8, 2015 12:48 PM

never mind.. i'm just going to use a table :)

juggledad Dec 8, 2015 01:09 PM

Because you also have a background image you need to use this
HTML Code:

body.page-id-247 {
    background: #ffffff none repeat scroll 0 0;
}


striped aardvark Dec 8, 2015 01:14 PM

aha! thank-you.


All times are GMT -6. The time now is 03:53 AM.

Powered by vBulletin® Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.