Welcome Guest, Not a member yet? Register   Sign In
CSS: background: transparent url(/images/menu_background.gif)
#1

[eluser]sawatdee[/eluser]
I am using css for my menu as such:
Code:
.horizontal_menubar
{
    background: #000000 url(/images/menu_background.gif) top left repeat-x;
}
However, my images directory is under my application directory. The following code works, but there is something about having my system directory in my css file that I don't like.
Code:
.horizontal_menubar
{
    background: #000000 url(/system/application/images/menu_background.gif) top left repeat-x;
}
I could also make my css file a php file and reference my images as URLs using site_url (), but that is a little bit of a hassle.

Has anyone else found a more graceful way to do this?
#2

[eluser]ejangi[/eluser]
CSS and images should really go in your public folder (the same folder as the index.php file) rather than system.

So, you might have, for instance:
Code:
|/home/user/domains/mydomain/public_html/:
| - /system/
| - /images/
| - /css/
| - /scripts/
etc...

For added security, try:
Code:
|/home/user/domains/mydomain/:
| - /system/
| - /public_html/
| - | - /images/
| - | - /css/
| - | - /scripts/
So your system folder cannot be browsed to.




Theme © iAndrew 2016 - Forum software by © MyBB