Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in Web Technology by (20.3k points)
edited by

I'm trying to follow a very basic example. Using the  starter page and the grid system, I was hoping the following:

<div class="row">

  <div class="span12">

    <h1>Bootstrap starter template</h1>

    <p>Example text.</p>

  </div>

</div>

...would produce centered text.

However, it still appears on the far left. What am I doing wrong?

1 Answer

0 votes
by (40.7k points)

For Pre-Bootstrap 3, you can use the CSS class pagination-centered like this:

<div class="span12 pagination-centered">

    Centered content.

</div>

In bootstrap.css (or bootstrap.min.css) class pagination-centered already exists and has the only one rule:

.pagination-centered{text-align:center;}

You can just use class text-center for Bootstrap 2.3.0. 

Related questions

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...