简体   繁体   中英

Bootstrap2 20px padding on both-sides of screen at 767px and below

good evening, I am using Joomla built in Bootstrap2. I am making website in full width view, the problem is below 768px 20px padding add on both sides of the screen. I have added following but its not working:

@media (max-width:767px) {

    .container-fluid {
     padding: 0;
    }
}

Thank you for your help.

Regards,

You need to update the rule defined in the responsive-bootstrap.min.css. Code in that file is :

@media (max-width:767px) {    
    body{
     padding-left: 20px;
     padding-right: 20px;
    }
}

So to make it zero you have to override that rule so replace your code with this:

@media (max-width:767px) {    
    body{
     padding: 0px;
    }
}

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM