Bootstrap responsive layout I'm creating a responsive page with bootstrap. I tested my code with my browser (Firefox and Chrome) and it works. Is the code clean or is there a better way to code it?

&lt;div class="col-xs-12 col-sm-6 col-md-4" style="margin-top: 2%;"&gt;
    &lt;div class="adress"&gt;
       &lt;ul style="list-style: none; padding-left: 0"&gt;
           &lt;li&gt;&lt;strong&gt;&lt;%= name %&gt;&lt;/strong&gt;&lt;/li&gt;
           &lt;li&gt;&lt;%= adresse %&gt;&lt;/li&gt;
       &lt;/ul&gt;
    &lt;/div&gt;
    &lt;div&gt;
        &lt;button class="btn btn-default btn-block" type="submit"&gt;Choose Address&lt;/button&gt;
    &lt;/div&gt;
    &lt;div class="row"&gt;
    &lt;div style="margin-top: 5%"&gt;
        &lt;div class="col-xs-6 col-sm-6 col-md-6"&gt;
            &lt;button class="btn-xs btn-default btn-block" id="editBtn" type="submit"&gt;Edit&lt;/button&gt;
        &lt;/div&gt;
        &lt;div class="col-xs-6 col-sm-6 col-md-6"&gt;
            &lt;button class="btn-xs btn-warning btn-block" id="delBtn" type="submit"&gt;Delete&lt;/button&gt;
        &lt;/div&gt;
    &lt;/div&gt;
        &lt;/div&gt;
&lt;/div&gt;
This is a small piece of code but few things I'm going to highlight here


When using the col class, it's best practice to have this class under a row class. This creates a grid structure e.g


    &lt;div class="row"&gt;
      &lt;div class="col-sm-4"&gt;.col-sm-4&lt;/div&gt;
      &lt;div class="col-sm-4"&gt;.col-sm-4&lt;/div&gt;
      &lt;div class="col-sm-4"&gt;.col-sm-4&lt;/div&gt;
    &lt;/div&gt;





One thing to note here is that in bootstrap grid structure the total number of columns you can have is 12 . You can read more on that Bootstrap Grids . So these lines defines more than 12 columns and it's abusing bootstrap usage


&lt;div class="col-xs-12 col-sm-6 col-md-4" style="margin-top: 2%;"&gt;
 &lt;div class="col-xs-6 col-sm-6 col-md-6"&gt;





I can see some Inline css declarations floating about, there isn't anything bad with that but it becomes cumbersome when you have many div's in your page. I suggest defining your css in an external stylesheet


I hope this helps