Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #740815

    Hi! I’m trying to remove the padding of a section on responsive mode. Here is the code I use for my section ID “entreprise”:

    #entreprise .responsive #top #wrap_all .container {
    margin-bottom: 0px!important;
    width: 100%!important;
    max-width: 100%!important;}

    I fixed it for the normal mode with this code:
    #entreprise .container {
    padding: 0px!important;
    }

    Can you help?

    #740833

    CSS means cascading style sheets – so you have to “fall down” the cascade to your desired rule to influence
    if you see your source code there is on top the class .responsive than #top etc. pp

    .responsive #top #wrap_all #entreprise .container {
    
    }

    the next is ( the class responsive exists even from beginning – it is not added in case of responsiveness)
    you have to work with media querries to solve your problem f.e. (if you set it to phones only you need here 768px)

    @media only screen and (min-width: 990px) {
    .responsive #top #wrap_all #entreprise .container {
    …………
    }
    }

    PS on top you are talking about padding and in your code there is margin. What would you like to influnce here?

    Because container had padding left right (0 50px)
    the following content in it has padding bottom top (padding-bottom, padding-top – each 50px).

    if you want to remove both there are two rules needed:

    @media only screen and (min-width: 990px) {
    .responsive #top #wrap_all #entreprise .container {
    max-width: 100% !important;
    padding: 0px !important;
    }
    .responsive #top #wrap_all #entreprise .content {
    padding-bottom: 0px !important;
    padding-top: 0px !important;
    }
    }
    • This reply was modified 7 years, 9 months ago by Guenni007.
    #740881

    Hi!

    The reply seems to be solid, please try it and let us know if it will work for you.

    Thanks a lot

    Cheers!
    Basilis

    #740970

    Thanks to Guenni007, it helped and this explanation will be helpful for other applications!

    #741610

    Hi,

    Great, glad you got it working. Thanks @guenni007 for helping out :-)

    Please let us know if you should need any further help on the topic.

    Best regards,
    Rikard

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.