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

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -