Disable a css for part of the content

只愿长相守 提交于 2019-12-24 00:42:47

问题


I am using Yii-bootstrap extension and I am having some styling problem because bootstrap css files affect the main content of the page.

My main content is a map done with OpenLayers so I am having several problems with styles mixing between them. I have tried to do a css file more general, as I have seen they recomend on the web,for applying different styles but as they are two "automatic" libraries is a hard work to try to guess how they work and the classes they use.

Is there any way to disable a css file for a concrete div?


回答1:


you can create a class for that div and reset the values you have changed for general divs.




回答2:


Nothing that I'm aware of, no.




回答3:


The only way I can see is..

<div class="outer">
    <div class="inner" >
        Inner Content
    </div> 
</div>

You could do something like..

.outer{
}

.outer .inner{
/* override the specific styles you need here */
}


来源:https://stackoverflow.com/questions/11793568/disable-a-css-for-part-of-the-content

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!