Change CSS

am new working with yii 2.0 but i always work with metro-boostrap css and i want to change yii CSS to this "METRO UI CSS 2.0", how can i change this.

Thanks

Same way as you’re doing it w/o Yii.

Doesn’t work at all, for example this is the code that am testing to check if the web load the CSS:

add at main file this line as you told me:


<link rel="stylesheet" type="text/css" href="css/metro-bootstrap.css">

and this is the code inside the page that i call through the menu.




<?php


use yii\helpers\Html;


/* @var $this yii\web\View */

$this->title = 'Testing CSS - Metro UI 2.0';

$this->params['breadcrumbs'][] = $this->title;

?>

<div class="">

    <h1><?= Html::encode($this->title) ?></h1>


    <button class="command-button primary">

        <i class="icon-share-2 on-left"></i>

        Yes, share and connect

        <small>Use this option for home or work</small>

    </button>

    <br>

    <button class="command-button inverse">

        <i class="icon-share-3 on-right"></i>

        Yes, share and connect

        <small>Use this option for home or work</small>

    </button>

  

</div>



this code should look like this

6163

picture 1.jpg

but it look like this

6164

picture 2.jpg

Open "net" panel in Chrome or FF debugger and see if CSS is loaded.

Am using Firefox 34.0.5 with Firebug 2.0.7, check the picture attached and you’ll see that the CSS is loaded.

6167

Testing CSS - Metro UI 2.0 - Mozilla Firefox.jpg

Well, it seems it’s loaded in a wrong order and you should wrap it into asset bundle in order to get it right: http://www.yiiframework.com/doc-2.0/guide-structure-assets.html

Thanks