htmlcss

How to overwrite css style


In my css style I have this line of code:

.flex-control-thumbs li {
    width: 25%;
    float: left;
    margin: 0;
}

for my pages. Now, some of my pages don't need this line

width: 25%;
float: left;

It is possible to overwrite it in internal css of the page, which will cause the original behaviour to be ignored?


Solution

  • Using !important is not recommended but in this situation I think you should -

    Write this in your internal CSS -

    .flex-control-thumbs li {
      width: auto !important;
      float: none !important;
    }