views:

254

answers:

1

Cakephp is giving me some problems as I have set as below (I have tried any number of urls, through localhost, placing it in webroot and giving reference from that file, giving full route from localhost (this is a local test ubuntu machine, not a 3rd party server), etc, etc but it just doesn't show up.. I am using a custom layout that overrides the default layout and, as far as I can tell, it contains no reference to any sort of background image.. here is from my css file:

body {
    background-image: url('http://localhost/site1/app/webroot/img/bg1.jpg');
    font-family:'lucida grande',verdana,helvetica,arial,sans-serif;
    font-size:90%;

}

I have tested that this works fine with a regular HTML file, I am hoping someone has an idea of what cake is up to that is giving me this problem.. thanks

EDIT: I have tested and I can display exactly the same image within a DIV (as its background) from the same css file.. something in Cakephp is overriding the body background-image setting, but I can't figure out what.

+1  A: 

You spelling for background is wrong:

ackground-image: url('/root/Desktop/bg1.jpg');

If that is not the case in your actual code, make sure that you are specifying the correct path, try adding a dot before /root/

background-image: url('./root/Desktop/bg1.jpg');
Sarfraz
oh that was a mistake that must've happened when I pasted it in.. its spelled fine in the css and not working (I edited my OP)
Rick
Its not a file path issue, I can display the same image within a DIV in the same CSS file, something with Cakephp is overriding the background-image setting for the body
Rick
@Rick: Try this then `background-image: url('/root/Desktop/bg1.jpg') !important;`
Sarfraz
I got it to work, I think it had something to do with my layout file, just a dumb error on my part.. I appreciate your help in this
Rick
@Rick: No problem :)
Sarfraz