I am trying to build a page using bootstrap. I want to create a layout that I see on a lot of marketing pages something like this:
I am currently setting the float and margins manually and getting some wonky results. The text doesn't flow around the image as the page resizes and doesn't maintain its vertical position in alignment as the window changes. Lastly, when the page is resized/ if a mobile user accesses the page, it should respond as follows:
- Image
- Paragraph
- Horizontal Rule
- Image
- Paragraph
- Horizontal Rule
- Etc...
Instead, with my current HTML, I am getting the following on mobile:
- Image
- Paragraph
- Horizontal Rule
- Paragraph
- Image
- Horizontal Rule
- Etc...
Here's the code I have so far:
<!-- language: lang-html --><div class="container">
<div class="row">
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<img class="do-icon-left img-responsive" alt="Terminal"
src="https://cdn4.iconfinder.com/data/icons/web-pages-seo/512/13-512.png" />
<p class="do-feature">
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
</p>
</div>
<div class="clearfix"></div>
<hr>
<div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
<p class="do-feature-left">
The quick brown fox jumped over the lazy dog. The quick brown fox jumped over the lazy dog.
</p>
<img class="do-icon-right img-responsive" alt="Terminal"
src="https://cdn4.iconfinder.com/data/icons/web-pages-seo/512/13-512.png" />
</div>
</div>
</div>
<!-- language: lang-css -->
.do-icon-left {
float:left;
margin-right: 100px;
width:287px;
}
p.do-feature {
margin-top:120px;
}
p.do-feature-left {
float: left;
margin-right: 100px;
width:350px;
}
.do-icon-right {
width: 287px;
float:right;
}
How can I build this properly using Bootstrap classes to facilitate?