How to remove border in div-css

I am using the following css to create a div:

.mod head-update{
    height: 40px;
    border-style: none!important;
    padding-bottom: 20px;
    padding-top: 20px;
}

      

However, I am getting two gray lines at the top and bottom of the div. How do I remove it?

+3


source to share


4 answers


Most likely, you should set the selector head-update

using a class .

or id #

, like: .head-update

(or #head-update

?)

Try



border: none !important;

      

(PS note the space between none

and !important

)

+8


source


Without testing it myself, this is how I would change the boundaries there as others say ...

border: none !important;

      

And without you wanting to try and override something, I would get rid of !important

.

Another thing I would like to do is try to point out background-color

.



background-color: #FFFFFF;

      

And if you have too many element and don't mind the attribute style

in your tag, you can do so, which should override any CSS rules that go against it ...

<div class="..." style="border:none; background-color:white"></div>

      

There could be a gray background somehow and another element inside a div that has a background color of white. With padding, this could result in some space above the inner white div

, and the parent div

(the one you are trying to fix) could somehow get gray from something.

0


source


Try this :)

margin: -8px;
...
      

Run code


0


source


change

border-style: none!important;

      

to

border : none !important;

      

-2


source







All Articles