[eluser]Unknown[/eluser]
Hello, I am quite noob to Code Igniter and while trying to port a site I have to use this framework I encountered this issue:
I have a php page which calls a css file, I ported this as specified in some C.I. help pages using:
Code:
<link href="<?php echo base_url()?>css/drop-down-menu.css" type="text/css" rel="stylesheet" />
However, inside the file drop-down-menu.css I've got a style spec like this:
Code:
#nav a.main {
background:url("images/tableft2.png") no-repeat left top;
margin:0;
padding:0 5px 0px 1px;
text-decoration:none;
width:7em;
}
I tried adding the same "<?php echo base_url()?>" to the "images/tableft2.png" url style, however, as I expected, PHP won't parse it.
My question therefore is, how would you solve this? aside of hard-coding the page URL in the style (using
Code:
url("mysite.com/images/tableft2.png")
). Is it possible to get the base dynamically?