Let's Start
I've noticed that you're currently using Bootstrap 2 for your website. If this is a new project of yours, I highly recommend upgrading to the latest version of Bootstrap (which is currently at version 3.3.6). The reason behind this suggestion is because the version you are using is outdated and no longer maintained.
The Issue at Hand
The problem likely arises from incorrect utilization of the grid system. In Bootstrap 2, rows exist to group columns together (referred to as .span*
in Bootstrap 2), with each row being divided into 12 columns. It's important to note that you do not need to include a row for every column you create.
To properly structure a row with 3 columns (in Bootstrap 2), your markup should resemble the following:
<div class="container">
<div class="row">
<div class="span4">
<h3>Lorem ipsum dolor</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus at cumque esse quam quaerat maiores.</p>
</div>
<div class="span4">
<h3>Lorem ipsum dolor</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus at cumque esse quam quaerat maiores.</p>
</div>
<div class="span4">
<h3>Lorem ipsum dolor</h3>
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit. Doloribus at cumque esse quam quaerat maiores.</p>
</div>
</div>
</div>
In Bootstrap 3, the concept remains the same, with an update to class names from .span*
to .col-*-*
.
Each column includes inner padding, eliminating the need for extra column dividers to separate content. However, offset classes can be utilized in certain instances.
Additional Advice
Finding additional tips on utilizing the grid system within Bootstrap 3 documentation would also benefit your current situation.
- Rows must be contained within a
.container
(for fixed-width) or .container-fluid
(for full-width) to ensure proper alignment and padding.
- Use rows to form horizontal collections of columns.
- Content should reside within columns, with only columns as direct children of rows.
- Specify the number of available columns out of twelve that you wish to occupy. For example, three equal columns would be represented by three
.col-xs-4
(equivalent to .span4
in your case).
I trust that this information has shed some light on your query. If you require further assistance, feel free to reach out.
Best Regards.