Background image in CSS - How to use base_url() in a CSS file |
[eluser]Juan Velandia[/eluser]
Hello, again a newbie question. I'd like to know how can I use the base_url() whitin a CSS file? is this possible? or if I want to use a CSS style with a background I should do something like this?: body{ padding:0px; margin:0 auto; background: url(http://example.com/system/application/vi...ground.jpg) 0 0 repeat-x; } Thanks a lot Juan
[eluser]danmontgomery[/eluser]
You should have an images folder in your css folder. All images in CSS are relative to the CSS file, so in that case you could always just use: Code: background: url(images/background.jpg) 0 0 repeat-x;
[eluser]Juan Velandia[/eluser]
Thanks noctrum, you are right, It will surelly work! Juan
[eluser]InsiteFX[/eluser]
Here is another way of doing... Code: <?php Name yourname.php Enjoy InsiteFX
[eluser]Juan Velandia[/eluser]
thanks insiteFx, i´ll check it, but i have to recognize that´s a bit confusing to me...
[eluser]InsiteFX[/eluser]
Hi, it sets the header to a css file but it is a php file with css code in it. This is a php file that has all the css in it just make it and include it. The ccs code is just part of my ie6 hacks. Enjoy InsiteFX |
Welcome Guest, Not a member yet? Register Sign In |