CSS -File containing a special div element

Hi guys, a simple question:

Which CSS file contains rules for my automatically generated div-class:

     <div class="container">



                    'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [],



                <?= $content ?>


I searched in my IDE for container and found dozen of files,inter alia this file:


I deleted it, but nothing changed.

Looking to my browser shows up css files in folder web/asset. Deleting them is absolutely pointless -they will be regenerated again!

Any ideas,where to change rules for div-class container?

It’s a default class in Bootstrap: http://getbootstrap.com/css/#grid-intro

You can use your browser’s developer tools to find out which file the definitions are coming from.

In your site.css. Add .breadcrumb {}. change to your hearts content :)

If you look at the source code in the browser, you’ll see that bootstrap.css is loaded from an /asset folder. I would NOT delete it, as you would loss ALL bootstrap styles.

you can override the container styles in your site.css file under web/css/

No, that’s not the file I can influence div class container

Furthermore,whatever I delete in folder web/asset, it will be generated again,automatically. My problem still is not solved :=(

I think you misunderstood @alrazi answer. In this file, site.css, you can put css rules to override main css rules.

if you want to override css rules for generic div element

div {

	border: 1px solid #000000;


the above code will add a black border to all div.

Files in web/asset are file generated by the yii2 framework based on what your application and extension register as assets.

If you delete them they get generated again.

boostrap.css is in the package boostrap package under


You should NEVER modify files under vendor, any change you do here will be lost at next composer package update.

So,what is central configuration file,where I can define my rules:

bootstrap.css or site.css?

I momentary changed rules in css file shown up my my browser,which is in folder


There I did well changing container style, but if it’s gonna deleted time by time, I’m not sure!


worst place where to make the change, change here will always get lost.

The bootstrap.css is the official bootsrap css file which is in the bower/bootstrap package

NEVER NEVER NEVER touch this file

If you look at your pages html code you will see that site.css is always the last css loaded, therefore any css rule in this file will override the ones in any previous css files.

This file is under web/css/site.css

This is the place for any css personalization.

All right. So, I have to remind overwriting css rules is principal approach defining css rules in yii-framework ?!

Thx a lot. This thread has been solved, but unfortunately this is still unsolved…