On Sun, Jun 8, 2008 at 8:31 PM, cirfu <[EMAIL PROTECTED]> wrote:
>
> i have a file i want to set as a background-image:
> background: url("C:\Python25\Progs\webapps\feedApp\templates
> \larsson.jpg")
>
> however inserting that somewhere doesnt set the image as background as
> supposed to.
> how do i set a background?
>
Hi cirfu,
im not sure if i understood your question, but here it goes my answer:
as you said, by writing 'background: url("path/to/the/img.png")' you
can set an img as a background
but i recommend you a couple of things:
* use relative paths insted of absolute paths.
eg: if your img is in c:/projects/this_app/images/img.png, just write
this_app/images/img.png, so when you move your project
to a different path, you dont end up with half of your links not working.
* use background-image: url(); or background: url() #fff;
so if you write in your css file:
background: url('path/to/img.png');
background:#fff; // this line will overwrite the previous one.
i mean, you could use either:
background: #fff
background-image: url();
or
background: url() #fff;
and finally, you just need to add the line you wrote before where you
want to have a bg image.
eg:
body {
margin: 0px;
padding: 0px;
background: url("C:\Python25\Progs\webapps\feedApp\templates\larsson.jpg");
}
i hope i didn't misunderstood you.
Regards,
Mauro
--
JID: [EMAIL PROTECTED]
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/webpy?hl=en
-~----------~----~----~----~------~----~------~--~---