Wordpress Themes - WP Forum at BFA
Click here to register or to donate.
Auto self-registration is not available here - far too many spammers. This forum has many, many backlinks and because of that there is an intense desire among spammers to drop their links here.

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Header configuration & styling »

[SOLVED] different background images for individual posts/pages


  #1  
Old Sep 9, 2010, 01:21 PM
goonygoogoo
 
10 posts · Sep 2010
I've been looking through the forum for an hour plus

I want to be able to give indiviual pages different backgrounds within the layout container.

I looked here

http://forum.bytesforall.com/showthr...yout+container

but i can't seem to get the code right.

I have put

body#body-page-id-2 div.page{
background-image:url(http://www.travellingkitchen.com/wp-.../aboutbg.gif);
}
into my css inserts
all i want to do is change the background of the about page on my site within the layout container.
im pretty darn sure that the image call is correct i am just effing up the div or the page id i don't know but i'm sure it's simple.

http://www.travellingkitchen.com/
  #2  
Old Sep 9, 2010, 04:11 PM
goonygoogoo
 
10 posts · Sep 2010
one thing i am wondering is if having background defined within the main body settings overrides any css inserts.

also the coding i sited was just the most recent iteration in desperation.
  #3  
Old Sep 10, 2010, 04:04 AM
juggledad's Avatar
juggledad
 
23,626 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
see http://forum.bytesforall.com/showthr...ght=image+page
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #4  
Old Sep 10, 2010, 06:14 AM
DragNfLy
 
10 posts · Aug 2010
HI

I am struggling with a similar problem if not exactly the same.

Been at it for 2 days now and have tried many different possibilities.

I have found this code to be the closest match:


body.home td#middle {
background-image: url("/wp-content/themes/atahualpa353/images/middle.jpg");
background-position:center top;
}

.... but I have a page set as my home page and am not sure if changing the first line ( body.home td#middle { ) to reflect the page ID will work.

I also need a different image for each pages' (layout area) background.
I too cannot seem to get the code right.

Can anyone please help a newb here.
  #5  
Old Sep 10, 2010, 06:16 AM
DragNfLy
 
10 posts · Aug 2010
Just saw your post now juggledad > will give this one a try and get back to this thread.

Thanks
  #6  
Old Sep 10, 2010, 06:56 AM
DragNfLy
 
10 posts · Aug 2010
Still no luck here. I am not getting any background image with this code.

The site is here > decodance.co.za

Please have a look
  #7  
Old Sep 10, 2010, 11:57 AM
goonygoogoo
 
10 posts · Sep 2010
my current code reads

body.page-id-2 div#image {
background-image:url(/wp-content/themes/atahualpa/images/aboutbg.gif);
}

I am pretty sure the "body.page-id-2" is ok
and i know the url call is right. I think i am just messing up the div not sure what it needs to be assigned to

td#middle is real close it works for the post area of the page but not the outlying area under the widgets header etc.

does w3 have a good primer on figuring out div?

Last edited by goonygoogoo; Sep 10, 2010 at 12:04 PM.
  #8  
Old Sep 10, 2010, 12:21 PM
lmilesw's Avatar
lmilesw
 
10,174 posts · Jul 2009
Central New York State USA
How about just using
HTML Code:
body.page-id-2 {
background-image:url(/wp-content/themes/atahualpa/images/aboutbg.gif);
}
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #9  
Old Sep 10, 2010, 12:23 PM
goonygoogoo
 
10 posts · Sep 2010
Sweet Jesus hallelujah.

the code that worked for those who come after.

body.page-id-2 div#container {
background-image:url(/wp-content/themes/atahualpa/images/aboutbg.gif);
}

now i just have to figure out what backgrounds i want to use now that i know how to do it!

and thank you to the mods
  #10  
Old Sep 10, 2010, 12:57 PM
goonygoogoo
 
10 posts · Sep 2010
[SOLVED] different background images for individual posts/pages

I just finished working through a problem but i thought i would explain the solution for those who come after.

I wanted to alter the background within the container for individual pages

the code that worked
inserted into ato css inserts

body.page-id-2 div#container {
background-image:url(/wp-content/themes/atahualpa/images/aboutbg.gif);
}

My understanding is that the code breaks down like this

"body.page-id-2" is the opening call it specifies what page you want to alter.
you can find out what that is by looking at the source code of the page in mozilla.

mine looked like this

<![endif]-->
</head>
<body class="page page-id-2 page-template page-template-default logged-in">
<div id="wrapper">
<div id="container">

you can see "page-id-2" that's what you want


"div#container" specifies what area of the page you are altering in my case the entire middle of the page.

you can leave it blank and that will alter the background behind the container or you can specify further like is td#middle which will alter only the middle part of the layout container i.e.

body.page-id-2 {

or

body.page-id-2 td#middle {

this finishes the "where" now onto the "what"


"background-image:url(/wp-content/themes/atahualpa/images/aboutbg.gif);" is what is encased in the {} it is the actual alteration to the page that you are performing in my case i am changing the background. note in my case aboutbg.gif is an image i created in photoshop that is the exact width of the fixed width container so i don't need to specify repeat or no repeat etc by default it repeats down the page.

this code could be anything you have already specified where exactly you want to make changes it need not be to the background it could also befont or font size or just about anything i would guess

hope that helps.

Last edited by lmilesw; Sep 10, 2010 at 01:11 PM.

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Separate background images for Pages flieg Center area post/pages 20 Sep 1, 2010 08:39 AM
WP - Images are displayed in PAGES but not in POSTS SupaNova Forum How-To 5 Jun 2, 2010 03:28 PM
[SOLVED] Help! I'm losing background images on pages and widgets berkleegrad Atahualpa 3 Wordpress theme 2 Mar 18, 2010 08:06 AM
[SOLVED] Insert Background image/Individual posts loislanemiami Post-Kicker, -Byline & -Footer 7 Aug 10, 2009 08:42 PM
Background images in pages ErikU Atahualpa 3 Wordpress theme 10 Apr 16, 2009 07:36 PM


All times are GMT -6. The time now is 12:52 AM.


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