row - How could I add padding to span's contents using css (not JS) in bootstrap? -


i've bootstrap site, defined background image body, size=cover; works fine in modern browsers.

then i've defined structure this:

<div class="row">     <div class="span12">         <div class="span1">&nbsp;</div>         <div class="span5">contact_form_content</div>         <div class="span5">map_etc_content</div>         <div class="span1">&nbsp;</div>     </div> </div> 

now, shots see how looks:

while viewing in desktop browser desktop view

while viewing in smartphone smartphone view

the problem

while viewing website in desktop browser, ok. each "< span1 >" @ left/right act padding @ left/right correctly, when viewing smartphone, these "< span1 >" transformed , placed @ top/bottom of content , padding @ left/right dissapears.

does have idea how solve without using js? i'd correct entire website css changes.

thanks

you can accomplish padding form content this:

css:

.padded { padding: 10px; } 

html:

<div class="row">     <div class="span12">         <div class="span1">&nbsp;</div>         <div class="span5">             <div class="padded">                  contact_form_content             </div>         </div>         <div class="span5">map_etc_content</div>         <div class="span1">&nbsp;</div>     </div> </div> 

Comments

Popular posts from this blog

monitor web browser programmatically in Android? -

Shrink a YouTube video to responsive width -

wpf - PdfWriter.GetInstance throws System.NullReferenceException -