40492

Bootstrap Center Scafolding

Question:

I'd have two "sections" in which I am using the bootstrap 3 scaffolding to style. I am having a hard time figuring out how I might have these maintain their column spacing while still be centered on the middle of the page. For example right now it is

<content><content> ---<space>---

and i want

---<space>--- <content><content> ---<space>---

Here is what i've got.

<div class=".container-fluid" id="aboutContent"> <div class="col-md-3"> <img src="../imgs/pic.jpg" alt="Joe Brunett" id="aboutPicture"/> </div> <div class="well col-md-4" id="desc">

text

</div> </div>

Answer1:

<div class="container"> <div class="row"> <div class="col-md-6 col-md-offset-3"></div> </div> </div>

<strong>Offsets</strong> can be used to center a div but remember that it'll work only for even columns

<div class="col-md-8 col-md-offset-2"></div>

You can even change the break-point by replacing

<div class="col-md-6 col-md-offset-3"></div>

with

<div class="col-sm-6 col-sm-offset-3"></div>

Recommend

  • Django model inheritance, filtering models
  • gspread or such: help me get cell coordinates (not value)
  • FileReader+canvas image loading problem
  • Insert into database using onclick function
  • Splitting given String into two variables - php
  • Deselecting radio buttons while keeping the View Model in synch
  • Why HTML5 Canvas with a larger size stretch a drawn line?
  • DotNetZip - Calculate final zip size before calling Save(stream)
  • How to add date and time under each post in guestbook in google app engine
  • How to set/get protobuf's extension field in Go?
  • DirectX11 ClearRenderTargetViewback with transparent buffer?
  • Validaiting emails with Net.Mail MailAddress
  • sending/ receiving email in Java
  • htaccess rewriting URLs with multiple forward slashes
  • Display Images one by one with next and previous functionality
  • Web-crawler for facebook in python
  • align graphs with different xlab
  • Akka Routing: Reply's send to router ends up as dead letters
  • Warning: Can't call setState (or forceUpdate) on an unmounted component
  • 0x202A in filename: Why?
  • Cannot Parse HTML Data Using Android / JSOUP
  • A cron job substitute?
  • How to delete a row from a dynamic generate table using jquery?
  • json Serialization in asp
  • Rails 2: use form_for to build a form covering multiple objects of the same class
  • Load html files in TinyMce
  • Free memory of cv::Mat loaded using FileStorage API
  • Java static initializers and reflection
  • How to stop GridView from loading again when I press back button?
  • How does Linux kernel interrupt the application?
  • How to get Windows thread pool to call class member function?
  • IndexOutOfRangeException on multidimensional array despite using GetLength check
  • unknown Exception android
  • costura.fody for a dll that references another dll
  • Observable and ngFor in Angular 2
  • How to Embed XSL into XML
  • UserPrincipal.Current returns apppool on IIS
  • Unable to use reactive element in my shiny app
  • Conditional In-Line CSS for IE and Others?
  • java string with new operator and a literal