0

I have link to an extended version of bootstrap within php (codeigniter):

<link href="<?= base_url() . RESOURCE_PATH . 'css/extended_bootstrap.' ?>" rel="stylesheet" /> 

In my CSS file I have:

input[type="file"]
{
behavior: url(PIE.htc);
}

But the url to PIE.htc hast to be relative to the root. How do I format the url so it is relative to root and not my extended version of bootstrap.css?

Community
  • 1
  • 1
Sheldon
  • 9,639
  • 20
  • 59
  • 96

2 Answers2

0

Use ../ to move "up" a level. You can tie these together to move multiple levels.

For example...

ROOT --> CSS --> style.css
ROOT --> pie.htc

To move back a level you would use ../pie.htc

Michael
  • 7,016
  • 2
  • 28
  • 41
0

if your folder structure is:

YourAppFolder/
    application/
           public/
               css/
               img/
         system/

Then use this in your views:

<link rel="stylesheet" type="text/css" href="<?=base_url()?>public/css/style.css"/>

and in css use this for image:

background:#356aa0 url(../img/background.png) repeat-x;
FAWAZ
  • 13
  • 1
  • 6