0

I have this .bx-wrapper element thats shown only on front page.

If it is displayed i need some extra top margin for my #columns.

This is the code I wrote so far :

 $(document).ready(function () {

    if ($(".bx-wrapper").length) {
        $('#columns').css({ "margin-top": "90px !important" });
    }

 }); 

However it is not working.

I'm new to jQuery and javaScript.

I guess there is a little mistake somewhere.

Thank you.

Bojan Petkovski
  • 6,835
  • 1
  • 25
  • 34
Jakub M
  • 59
  • 6

1 Answers1

0

You should remove the !important inside the setting of the css property. Because it is added as an inline style, it is overruling any CSS styles anyway.

So change:

$('#columns').css({ "margin-top": "90px !important" });

To:

$('#columns').css({ "margin-top": "90px" });

And it should work.

ZiNNED
  • 2,620
  • 20
  • 31