html - What is the correct way to use grids? -


i have started learn bootstrap. , first time have ever used grids layout. don't understand grids should put content.

should this:

<div class="row">     <div class="col-md-12">         <p> content </p>     </div> </div> 

or should use parent element content this

<div class="row">     <div class="col-md-12">         <div> or <footer> or <aside> or <content> etc             <p> content </p>         </div> or </footer> or </aside> or </content> etc     </div> </div> 

if answer second. there ever reason okay put content directly column? or have misunderstod , should done in completly other way?

what "best practice"?

the best way this:

<div class="container">  <div class="row">     <div class="col-md-12">        <div class="your-widget-name">          widget code here…        <div>    </div> </div> 

this way, widgets can used across multiple layouts. using separate divs grid can increase amount of markup, make code easier maintain.


Comments

Popular posts from this blog

swift - Button on Table View Cell connected to local function -

dns - Dokku server hosts two sites with TLD's, both domains are landing on only one app -

c# - ajax - How to receive data both html and json from server? -