-
AuthorPosts
-
January 31, 2017 at 6:25 pm #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?
January 31, 2017 at 7:13 pm #740833CSS 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.
January 31, 2017 at 9:22 pm #740881Hi!
The reply seems to be solid, please try it and let us know if it will work for you.
Thanks a lot
Cheers!
BasilisFebruary 1, 2017 at 4:17 am #740970Thanks to Guenni007, it helped and this explanation will be helpful for other applications!
February 2, 2017 at 7:57 am #741610Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.