css - what is my mistake about making responsive? -
i started making html code responsive, face white problems, example footer has background white 4 columns,i think problem used background footer don't know how make responsive.
h4 { font-size: 16px !important; font-family: 'open sans', sans-serif; font-weight: bold; color: white; } .font-icon { float: left; color: white !important; padding: 0 15px 0 0; font-size: 25px !important; } .font-icon:hover { color: #80878e !important; } .footercol p { color: white; } .footercol:nth-child(2) span { display: block; } .footercol { float: left; } .footercol li, .footercol span, .footercol { color: #80878e; font-size: 12px; font-family: arial; line-height: 2.5; } .footercol h4 { padding: 0 0 20px; color: white; font-family: 'open sans'; font-size: 16px !important; font-weight: bold; } .footercol li { color: white; margin: 0 0 0 15px; } .footercol { text-decoration: none; } .footercol a:hover { color: white; }
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/css/bootstrap.min.css" rel="stylesheet" /> <div class="footer container-fluid"> <div class="container"> <div class="row"> <div class="footercol col-lg-3 col-md-4 col-xs-4 col-sm-4"> <h4>follow us</h4> <div> <span class="icon-facebook font-icon"></span> <span class="icon-google-plus font-icon"></span> <span class="icon-rss font-icon"></span> <span class="icon-social-pinterest font-icon"></span> <span class="icon-linkedin font-icon"></span> </div> </div> <div class="footercol col-lg-3 col-md-4 col-xs-4 col-sm-4"> <h4>address</h4> <span>9870 st vincent place,</span> <span>glasgow, dc 45 fr 45.</span> <span>freephone: +1 800 559 6580</span> <a href="#">mail@demolink.org</a> </div> <div class="footercol col-lg-3 col-md-4 col-xs-4 col-sm-4"> <h4>support menu</h4> <ul> <li><a href="#">lost password?</a> </li> <li><a href="#">forgot username?</a> </li> <li><a href="#">your membership</a> </li> <li><a href="#">your account</a> </li> <li><a href="#">support forum</a> </li> </ul> </div> <div class="footercol col-lg-3 col-md-4 col-xs-4 col-sm-4"> <h4>about us</h4> <ul> <li><a href="#">customer focus</a> </li> <li><a href="#">performance</a> </li> <li><a href="#">affiliates</a> </li> <li><a href="#">cv review</a> </li> </ul> </div> </div> </div> </div>
edit: first problem you're using 4 divs containing col-sm-4 on 12 col-based grid. 4*4 = 16. making last div "jump down" when screen size less 992px wide if i'm not mistaken.
to make things right, need understand bootstrap based on 12 column grid. example; html/markup:
<div class="container my-footer"> <div class="row"> <div class="col-md-3 col-sm-3 col-xs-12"> <h4>address:</h4> <ul> <li>footer stuff</li> <li>footer stuff</li> <li>footer stuff</li> </ul> </div> <div class="col-md-3 col-sm-3 col-xs-12"> <h4>projects:</h4> <ul> <li>footer stuff</li> <li>footer stuff</li> <li>footer stuff</li> </ul> </div> <div class="col-md-3 col-sm-3 col-xs-12"> <h4>about us:</h4> <ul> <li>footer stuff</li> <li>footer stuff</li> <li>footer stuff</li> </ul> </div> <div class="col-md-3 col-sm-3 col-xs-12"> <h4>contact:</h4> <ul> <li>footer stuff</li> <li>footer stuff</li> <li>footer stuff</li> </ul> </div> </div> </div>
Comments
Post a Comment