|
#1
Aug 27, 2015, 11:10 PM
|
|
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?
|
#2
Aug 28, 2015, 03:53 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Sure create a css selector targeting that page and a CDs rule to not display it
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#3
Aug 28, 2015, 07: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;}
|
#4
Aug 28, 2015, 07:59 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
what's the url?
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#5
Aug 28, 2015, 08:10 AM
|
|
PM'd you with link to url
|
#6
Aug 28, 2015, 10:50 AM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
HTML Code:
body.page page-id-225 {background-image: none;}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#7
Aug 28, 2015, 11:21 AM
|
|
Great! Much appreciated.
|
#8
Aug 28, 2015, 12:45 PM
|
|
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?
|
#9
Aug 28, 2015, 12:58 PM
|
|
It must have been a caching problem, because it is now correct.
However, the background image is still showing.
|
#10
Aug 28, 2015, 01:33 PM
|
|
Okay, I got it to work. The css rule needs to be:
HTML Code:
body.page-id-225 {background-image: none;}
|
#11
Aug 28, 2015, 05:52 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
Oops typo, glad you could dig in and figure it out!
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#12
Dec 8, 2015, 01:22 PM
|
|
|
50 posts · Mar 2010
dundas, ontario, canada
|
|
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/
|
#13
Dec 8, 2015, 01:48 PM
|
|
|
50 posts · Mar 2010
dundas, ontario, canada
|
|
never mind.. i'm just going to use a table
|
#14
Dec 8, 2015, 02:09 PM
|
|
|
|
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
|
|
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;
}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
|
#15
Dec 8, 2015, 02:14 PM
|
|
|
50 posts · Mar 2010
dundas, ontario, canada
|
|
aha! thank-you.
|
|