Back | Reverse | Quick Reply | Post Reply |

CSS - Background/Background-image property
Link | by czetsuya on 2006-09-05 23:32:59 (edited 2006-09-05 23:34:30)
I wanted to set the bg of my page via css and it works when i included in the page something like (Note it's mistyped):
  >style=text/css< 
    background-image: url(url)/background: url(url);  
  >/style<

and it works fine, but when I put the code in an external .css file it won't. I tried putting different properties in that file like background-color and the result is visible on the page. Just wondering why background-image/background didn't. By the way I have tried both IE6 and Firefox so it's not a browser issue. :-) Thanks.

http://czetsuya-travel.blogspot.com

Re: CSS - Background/Background-image property
Link | by gendou on 2006-09-06 09:00:41
could be the relative paths.
instead of "images/background.jpg" try "http://mydomain.com/images/background.jpg"


Re: CSS - Background/Background-image property
Link | by czetsuya on 2006-09-07 00:38:01
yes! i does work. after examining why it won't i just found out that the base path was replaced by the path where the .css file resides... i wonder why? base path should be constant right?

hontou ni arigatou gozaimasu, it did bugged me for a while :-)

http://czetsuya-travel.blogspot.com

Re: CSS - Background/Background-image property
Link | by Angel on 2006-09-09 19:32:52
That's how it always is when you do external CSS. It actually makes your life much easier since you can just put all the images you want for your layout with the stylesheet and just take it from there instead of putting your layout stuff in your root directory where other files will also be.

Re: CSS - Background/Background-image property
Link | by czetsuya on 2006-09-10 22:04:03
Yeah, i understand that for structure.. now my question is why would the root directory shift to something like /root/css/... when i access the .css file so i do have to put something like ../images/picture.jpg to access the actual picture... instead of putting /root/images/picture.jpg, i do have to go up one directory ../images/picture.jpg inside the .css file :-)

http://czetsuya-travel.blogspot.com

Back | Reverse | Quick Reply | Post Reply |

Copyright 2000-2024 Gendou | Terms of Use | Page loaded in 0.0025 seconds at 2024-04-27 02:12:47