Help with bootstrap layout

I am still having a crack at this web thing after so many years of joining Sitepoint (in 2003?)

I may be a slow learner, but I work in the industry, mostly.

Anyway, I am trying to create a simple layout. I am putting this into a SharePoint site.

Here is some code as an example (not working)




<!DOCTYPE html>
<html lang="en">
<head>
  <title>Bootstrap Example</title>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
  <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>

<style type="text/css">
	/* Some custom styles to beautify this example */
    .a{
		min-height: 150px;
        background: #dbdfe5;
    }
    .sidebar{
        min-height: 350px;
        margin-bottom: 30px;
        background: #b4bac0;
    }
</style>
<body>


<div class="container-fluid">
   <div class="row">
      <div class="col-lg-4 a">
         <h2> Col 1</h2>
			<p>Content</p>
      </div>
      <div class="col-lg-4 a">
		<h2>Col 2</h2>
			<p>Content</p>
      </div>
      <div class="col-lg-4 sidebar">
      	<h2>Discussion area</h2>
        <p>This column needs to expand down, however as it does, it will push Col 2 and col 4 down</p>
      </div>
   </div>

    <div class="row">
        <div class="col-lg-4 a">
            <h2>Col 3</h2>
            <p>This column needs to wrap under Col 1 and 2. Perhasp it should be nested?</p>
        </div>
        <div class="col-lg-4 a">
        <h2>Col 4</h2>
            <p>This column needs to wrap under Col 1 and 2. Perhasp it should be nested?</p>
        </div>
    </div>
</div>

</body>
</html>

Some thoughts

  • Do I nest?
  • Do I use an offset?
  • Do I push / pull?
  • So I use a sidebar / Section?

I am using bootstrap 3.X

This layout is kind of doing what I want

(it is the wrong way around tho)

I also think this is a clue.

Thanks in advance for any help!

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.