Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Header configuration & styling (http://forum.bytesforall.com/forumdisplay.php?f=15)
-   -   Different background image for a single post and page (http://forum.bytesforall.com/showthread.php?t=5232)

wll Jan 10, 2010 04:24 AM

Different background image for a single post and page
 
Someone got the css code?

I found something relative: http://forum.bytesforall.com/showthr...nd+single+post

juggledad Jan 10, 2010 05:00 AM

see post#6 of that thread, that is the code, just put it in ATO->Add HTML/CSS Inserts->CSS Inserts
You will have to know the page ID you want it to work on. This can be found by viewing that page in your browser, viewing the source and searching for '<body'. You will see the page id there.

wll Jan 10, 2010 05:03 AM

You mean like this:

div.post-6 {
background: url(/wp-content/themes/atahualpa/images/bg2.jpg) repeat top left
}

wll Jan 10, 2010 05:06 AM

It seems the background image appears in the post. I mean the background image of the body. Is this possible?

juggledad Jan 10, 2010 06:17 AM

sorry, use 'body.page-id-xx {...}'

wll Jan 10, 2010 06:57 AM

Thanks alot! It works :)

The final code is for pages:

body.page-id-2 {
background: url(/wp-content/themes/atahualpa/images/logo.jpg)
}


Do you also know the code for post?

juggledad Jan 10, 2010 09:04 AM

well the simple code would be
HTML Code:

div.post-6 {
background: url(/wp-content/themes/atahualpa/images/bg2.jpg) repeat top left
}

but say you wanted bg5.jpg for post 6 when on the home page you woud code
HTML Code:

body.home div.post-6 {
background: url(/wp-content/themes/atahualpa/images/bg2.jpg) repeat top left
}


mattdans Sep 18, 2012 04:57 PM

First, thank you for having this conversation. It is quite helpful on my side. Thanks!

The code works and below is what I have in the style.css under body {...}

HTML Code:

body.page-id-1137 {
background: url(/wp-content/uploads/2012/09/sunrise-in-grass-fields-1920x1080.jpeg) repeat top center
}

Now the problem, there's a white space in between the header and page itself. I tried different ways but all they do is expand the white space even more. What bothers me is that the page's body is in its place but the background isn't.

WP Theme is called 'Ammon'

juggledad Sep 18, 2012 06:03 PM

Mattdans: step 1) switch to the atahualpa theme since that is what this forum supports


All times are GMT -6. The time now is 12:24 PM.

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