On some of my pages the bootstrap css doesn’t load properly. and on some it does. But when i view the page source. the bootstrap.css is there.
My AppAsset looks like this,
<?php
namespace frontend\assets;
use yii\web\AssetBundle;
/**
* Main frontend application asset bundle.
*/
class AppAsset extends AssetBundle
{
public $basePath = '@webroot';
public $baseUrl = '@web';
public $css = [
'css/site.css',
];
public $js = [
];
public $depends = [
'yii\web\YiiAsset',
'yii\bootstrap4\BootstrapAsset',
// here we add our FontAwesomeAsset bundle class
'frontend\assets\FontAwesomeAsset'
];
}
things like this don’t work, the panel
doesn’t have borders and title is white
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title">
<img class="img-rounded" src="//gravatar.com/avatar/?s=24" alt=""> </h3>
<ul id="w0" class="nav flex-column nav-pills"><li class="nav-item"><a class="nav-link" href="/yii2/frontend/web/index.php?r=user%2Fsettings%2Fprofile">Edit Profile</a></li>
<li class="nav-item"><a class="nav-link active" href="/yii2/frontend/web/index.php?r=user%2Fsettings%2Fnetworks">Networks</a></li></ul>
<ul id="w1" class="nav flex-column nav-pills"><li class="nav-item"><a class="nav-link" href="/yii2/frontend/web/index.php?r=user%2Fsettings%2Fprofile">Reports Purchased</a></li></ul>
</div>
</div>
and in my views/layouts/main.php
i have AppAsset::register($this);
at the top of the file.
Any idea why? or how to fix this? I’m using yii2-bootstrap4