Styles in views are not connected: <link href="/css/1.css" rel="stylesheet"> - this way is not visible. You have to add <?= $asset->baseUrl ?> . How to fix it?
The structure of the application is as follows:
In the view I connect:
$asset = app\assets\AppAsset::register($this); AppAsset:
class AppAsset extends \yii\web\AssetBundle { public $sourcePath = '@app/media2/'; public $css = [ 'css/1.css', 'css/theme-4-bootstrap.css', 'css/vendor.css', 'css/theme-4.css', 'css/demo.css', 'css/custom.css' ]; ................... public $depends = [ 'yii\web\JqueryAsset', 'yii\bootstrap\BootstrapAsset', 'yii\web\YiiAsset', ]; } web.php:
'assetManager' => [ // uncomment the following line if you want to auto update your assets (unix hosting only) //'linkAssets' => true, 'forceCopy' => true, //перезапись файлов стилей 