Background image for panels page

Status: 
Solved
Question: 

Hello again!

Now I have another problem :) I would like to set a background image for panels 3 page.
So, what I have done already: On "Pages » Node view » General" I have set "CSS ID" as "profile". Then in "CSS code" textfield I have written this css code to set a background image:

#profile {
background-image: url(sites/default/files/userbgs/splash.jpg);
}

... but nothing happens. What could be the problem?

Responses

1. question

is it located inside your content region? if it is then try adding this as code:

#content #profile {
background-image: url(sites/default/files/userbgs/splash.jpg);
}

2. You mean, if my CSS code is

You mean, if my CSS code is inside my content region or if my background image is inside my content region? None of them.
I would like to set one background image for all content regions. I also tried to put this code

#profile {
background-image: url(sites/default/files/userbgs/splash.jpg);
}

in my theme's "style.css" but also nothing happens.

3. well

i meant your profile , is it showing on a sidebar or content?

If you want to add that image for ALL your content regions , wich means every page or story will get that background then use

#content {
background-image: url(sites/default/files/userbgs/splash.jpg);
}

that might change depending on your theme and it custom regions.

if you want that background applied only to the "profiles" pages then use:

#content #profile {
background-image: url(sites/default/files/userbgs/splash.jpg);
}

if its showing on a sidebar like a block you should use #sidebar-first #profile....

hope it helps

anyways, wich theme are you using?

4. Oh, now I understand :) My

Oh, now I understand :)
My profile is showing on content and I would like that my background image would be applied only to the "profile" pages.
I put your recommended code in CSS code textfield but nothing happened again.
I was using Garland but due to some problems in css file, I switched to Bluemarine.
I made a screenshot: http://flash.edot.lv/css_sample.png
Maybe you can tell from that screenshot what I'm doing wrong?

5. Duh!

all this time and never noticed that the only thing we are doing wrong is the css code xD, the only thing thats wrong is the url of your picture

#content #profile {
background-image: url(/web/sites/default/files/userbgs/splash.jpg);
}

or

#content #profile {
background: #E2001A url(/web/sites/default/files/userbgs/splash.jpg) repeat scroll 0 0;
}

of course change the "web" word for the name of your drupal folder

i like the second one better =)

6. Thanks xdemianx! I tried your

Thanks xdemianx!
I tried your two newest codes (changed "web" to my drupal folder of course) but nothing happend again... I was using Garland theme when I tried these codes. Also, when I click on "view source" of my profile content then I can't find a name of my background image and also can't find a CSS ID called "profile".
There's gotta be something what I'm doing wrong. Is it right if I put one of these CSS codes in Panel's "CSS code" textfield? Maybe I need to put the code in some "style.css" or in something like that?

7. Both Ways Should Work

both ways should work, if you use firefox as web browser ill recomend to use Firebug Addon , it makes css and html editing way more easies so you can check if its really "reading" your code or is it getting "overrided" by something else, in theory it should be working right now i always add css that way and never found a problem , ive also made a clean copy with core drupal, views and panels only to check this out and it worked on my first try so maybe firebug will guide you better on this.

you should try adding it directly to your style.css anyway just to see what happens or maybe give us a link to your test site , if its posible, so we can check it by ourselves.

8. I will play around CSS, maybe

I will play around CSS, maybe I will try it with different themes and then I'll tell if I will get some progress. Anyway, thanks a lot man!

9. No Problem!

No problem, i hope you find it out soon! if you do let me know

10. Now in panel's "CSS ID" text

Now in panel's "CSS ID" text field I entered "profile_id" and css code for background image in "CSS CODE" text field, and then I looked in the source, and there was written:
"div class="panel-display panel-3col-33-stacked clear-block" id="profile_id">
div class="panel-panel panel-col-top">
div class="inside">/div>
/div>"
.. but there isn't written anything about my background image.

Then I tried to change background in my theme's "page.tpl.php". I wrote this code: "div style="background-image: url(/world/sites/default/files/userbgs/splash.jpg)"> ......... /div>". Background image really changed (it's also displayed under "view source") but for whole web site. Maybe there is some way to set background image only for profile's content type in "page.tpl.php"?

*NOTE: I removed "<" in my HTML code because if I wouldn't remove them, then my HTML code wouldn't show in this post.

11. >_<

have you tried to add "CSS ID" on panels but "CSS CODE" on your Style.css? have you tried checking the css code with firebug?

im not sure about how are you looking at that source code but if its html only then it wont show your css parameters

12. My apologies...

xdemianx, I finally checked Firebug and that add-on is very helpful. Thanks for recommendation! Unfortunately, I found out that my panel page is located under sidebar (I guess) and that's why I need another code. Sorry for my stupidity, I'm not very close friend to CSS.
So, I uploaded a screenshot of Firebug where you can see all hearchy of DIV IDs until my "profile_id" is reached: http://flash.edot.lv/firebug.png
I tried a lot of variations in css but still can't get that thing working.

13. Try this

make it #center #profile_id { and the rest of the code
hope it works now

14. Success!

This didn't work either but I switched theme to "ZEN classic", then in "zen-classic.css" I wrote "#content #profile_id {
background-image: url(/world/sites/default/files/userbgs/splash.jpg);
}" and it works!
Thanks for the help! :)

15. I've been designing custom

I've been designing custom Drupal themes since 2006. Some of my themes are freely available on Drupal.org. You'll find my designs in use on thousands of websites around the world. I'm also the creator of the most popular independent Drupal resource on the web,drupal themes