yii - How to specify image paths in CSS files? -
i'm using yii framework , have css file uses images background , similar.
other php code can use yii::app()->request->baseurl prefix resources correct path. however, css file not php, cannot use code.
i tried relative paths, same css file accessed html pages of different depth, example:
http://mysite/controller/action1/10 http://mysite/controller
so relative paths don't work (at least, not in browsers).
is there yii-way of doing this, or should use absolute paths , done it?
the paths images in css files relative css file, not page referencing css file.
so shouldn't matter using css file in html pages @ different path depths, looks location of css.
for example, if css file in /content/css
, images in /content/images
should reference images url(../images/something.png)
.
Comments
Post a Comment