Search code examples
csswordpressmargin

CSS margin issue - Wordpress


Good morning gentlemans.

I´m currently having a little bit of an issue and because I´ve been stuck on this for hour, I wanted to give it a shot here and ask wiser and more experienced people than I´m.

I´m working on site - https://canal.predajweb.sk/ and my issue is that #page .page-container is getting margin-top as an element.style. I´ve read something about collapsing margins and I´ve been looking for a solution, but without any succcess. My main issue is that I don´t know where is that margin from (from where that container gets that margin)

I believe its going to have some simple solution, but as I´m quite new to this, I don´t know what to look for.

Thanks very much for kind advices and have a great day! Dan.


Solution

  • Well its like an jQuery or Javascript problem, Anyway if you want to have a specific margins set :

    #page {
        margin-top: 20px !important;
    }
    

    Otherwise you need to check your scripts and css files for any unwanted code.

    jQuery Solution:

    jQuery('#page').css('margin-top','0');