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

  • Home
  • SEARCH
  • 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 8162553
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T18:45:21+00:00 2026-06-06T18:45:21+00:00

With twitter bootstrap.css and bootstrap-responsive.css, .span* become equivalent to a .span12 under 768px .

  • 0

With twitter bootstrap.css and bootstrap-responsive.css, .span* become equivalent to a .span12 under 768px.

This behaviour is perfectly fine when text is embedded, but for pictures it make sense to use a 2x2 layout between 4x1 and 1x4.

How to obtain this 2x2 layout from 767px to 320px?

768px wide (4×1)
4x .span3 with 768px width

767px wide (1×4)
4x .span3 with 767px width

HTML:

<div class="row-fluid">
    <ul class="thumbnails">
        <li class="span3">
            <div class="thumbnail" href="#">
                <img alt="" src="http://placehold.it/200x150">
                <p>1</p>
            </div>
        </li>
        <li class="span3">
            <div class="thumbnail" href="#">
                <img alt="" src="http://placehold.it/200x150">
                <p>2</p>
            </div>
        </li>
        <li class="span3">
            <div class="thumbnail" href="#">
                <img alt="" src="http://placehold.it/200x150">
                <p>3</p>
            </div>
        </li>
        <li class="span3">
            <div class="thumbnail" href="#">
                <img alt="" src="http://placehold.it/200x150">
                <p>4</p>
            </div>
        </li>
    </ul>
</div>

http://jsfiddle.net/baptme/jWcdS/


Notes: This question is inspired by the request asked in a comment on this answer

  • 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-06T18:45:22+00:00Added an answer on June 6, 2026 at 6:45 pm

    CSS:

    @media (min-width: 320px) and (max-width: 767px) {
        .row-fluid .thumbnails .span3 {
            width:48.6188%;
            margin-left: 2.76243%;        
            float:left;
        }
        .row-fluid .thumbnails .span3:nth-child(2n+1) {
            margin-left: 0;
        }
    }
    

    http://jsfiddle.net/baptme/jWcdS/1/

    500px wide (2×2)

    4x .span3 with 500px width

    319px wide (1×4)

    4x .span3 with 319px width

    Explanations:

    Media queries can be used to override twitter bootstrap between 320px and 767px by using @media (min-width: 320px) and (max-width: 767px)

    .row-fluid .thumbnails .span3 has been used over a .span3{ ... } or .row-fluid .span3{ ... } for the following reasons:

    • 3 classes make enough priority to override .row-fluid .span3 from bootstrap.css
    • adding .thumbnails between .row-fluid and .span3 will not affect the other .row-fluid .span3 used for the layout.

    The width:48.6188%; and margin-left: 2.76243%; correspond the the value given to a .row-fluid .span6

    The float:left; overrides the float:none

    The pseudo class nth-child(2n+1) has been used with margin-left: 0; to remove the left margin on the .row-fluid .thumbnails .span3 ending up on the left side of the page (1 and 3).

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

Sidebar

Related Questions

I am integrating twitter bootstrap css into my application. Going along just fine,but I
I have this (using the Twitter bootstrap css sheet): <!DOCTYPE html> <html lang=en> <head>
I'm using twitter bootstrap and my nav bar works fine with collapse function. This
I'm creating a Site using Twitter Bootstrap 2.0.4 + bootstraps responsive.css. What I don't
I'm new using the excellent stuff of css twitter bootstrap and having a problem,
I am using Twitter Bootstrap, (CSS and JS). The problem comes from the Modal
I am trying out twitter bootstrap and am new to CSS/HTML. Here's my simple
For example http://twitter.github.com/bootstrap/base-css.html try to scroll up. You will see the bar with Typography
In my CSS, I'm using 2 class selectors (Twitter bootstrap w/ 30 columns): .row-fluid
I'm having a design/css issue. I'm using Twitter Bootstrap and have a .row-fluid, with

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.