Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8437493
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T07:26:42+00:00 2026-06-10T07:26:42+00:00

Community, I recently stumbled upon Twitter Bootstrap while looking for possibilities to design a

  • 0

Community,

I recently stumbled upon Twitter Bootstrap while looking for possibilities to design a webpage without being able to actually “design” (coder-cliché, meh). I’ve gotten a big fan of it’s instant cross-compatibility and as the site is planned with a blog in mind I do not consider it impossible that it will be visited by mobile users.

And that specific blog is what causes me problems. Having a blog post span about the whole grid (span12, up to 1170px in width) creates a massive wall of text that would scare everyone away. Instead, I decided to create (atleast the previews) in span6, which seems reasonable to me and also works good for mobile users. But as I don’t want more than 1 per row I’ll need to center it somehow, and I would prefer to do it “the Bootstrap way”.

The official docs pointed me to the .offset* classes, which work great on desktops, but will be preserved when switching to the mobile layout, creating an ugly gap on the left side. Without the offset it works without problems on the mobile version (1 post per row, no gap left or right) but on desktops it is left-aligned. Here the relevant bit of the code:

No offset, working as intended on mobile devices:

<div class="row-fluid">
    <div class="span6">
        <h3>Blog Post #1 Title</h3>
        <h5>Category, Sub-Category - 01.01.1970</h5>
        <p>Lorem ipsum...</p>
    </div><!--/span6-->
</div><!--/row-->

With offset, working as intended on desktops:

<div class="row-fluid">
    <div class="span6 offset3">
        <h3>Blog Post #1 Title</h3>
        <h5>Category, Sub-Category - 01.01.1970</h5>
        <p>Lorem ipsum...</p>
    </div><!--/span6-->
</div><!--/row-->

Is there any way (without JavaScript!) to get it to behave like I want to (cross-compatible centering of the element while keeping all text in it left-aligned)? I’d guess I’ll need to change the bootstrap-responsive.css, but I’d like to restrain from messing with the original files…

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T07:26:43+00:00Added an answer on June 10, 2026 at 7:26 am

    Somehow I just got an idea that turned out to be working perfectly fine, without using any CSS modifications:

    To center the element using the grid-system we fill the rest of the row with placeholders. For my span6-example that would be

    <div class="row-fluid">
        <div class="span3"></div>
        <div class="span6">
            <h3>Blog Post #1 Title</h3>
            <h5>Category, Sub-Category - 01.01.1970</h5>
            <p>Lorem ipsum...</p>
        </div>
        <div class="span3"></div>
    </div>
    

    which results in a centered version on desktop and tablets, and in a full-width version on phones. However, due to the fluid layout, there will be gaps in the mobile layout, as the empty div’s also take a small amount of space. But as that problem only occurs on phones, we can avoid it by adding the hidden-phone-class to the placeholder-div’s, like this:

    <div class="row-fluid">
        <div class="span3 hidden-phone"></div>
        <div class="span6">
            <h3>Blog Post #1 Title</h3>
            <h5>Category, Sub-Category - 01.01.1970</h5>
            <p>Lorem ipsum...</p>
        </div>
        <div class="span3 hidden-phone"></div>
    </div>
    

    And, in the end, that works like I intended it to, atleast on Bootstrap version 2.1.0…

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Recently I was looking at some source code provided by community leaders in their
Ive recently get IPBoard board software for my gaming community, I converted it from
Recently, the StackOverflow community helped me develop a fairly concise @memoize decorator that is
Hello StackOverflow community! I started to learn Node.js recently, and decided to implement a
I'm curious to know what the community feels on this subject. I've recently come
With the help of this community, I just recently solved some issues with PHPExcel
A developing consensus among the iPhone developer community is that Apple has recently started
I recently had to troubleshoot a performance problem with a slow grid load. Upon
I recently installed Community Builder for Joomla!. I can't seem to have a capcha
I have been using SVN for a little while now. recently on a project

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.