Naj Naj - 4 months ago 35
CSS Question

Failed override bootstrap stylesheet

I am using bootstrap webjars (maven dependencies) with my jsp pages, and I tried to override bootstrap stylesheet by creating new stylesheet. But, I can't see any changes, even though I respect the order of stylesheet in jsp pages and I added the new stylesheet to servlet-context. Any idea how to fix this ?

This is the servlet-context :

<resources mapping="/resources/**" location="/resources/" />
<resources mapping="/webjars/**" location="/webjars/"/>
<resources mapping="/bootstrap/css/**" location="/bootstrap/" />

and this the declaration of stylesheets in jsp page :

<link href="webjars/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet">
<link href="/bootstrap/css/stylesheet.css" type="text/css" rel="stylesheet">

and this is stylesheet I created, it's not complet

body {
background-color:lightblue !important;


color:navy !important ;
margin-left: 20px !important;


A then you can apply the same code of css that wrote by you with "!important" of the same page where you want to apply the css ...

          ## YOUR CODE##