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 8315177
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T21:04:24+00:00 2026-06-08T21:04:24+00:00

I realise that padding in Twitter Bootstrap has been done somewhat to death and

  • 0

I realise that padding in Twitter Bootstrap has been done somewhat to death and I have previously managed to achieve it to an extent but am currently stuck on trying to get my three span4 columns to sit nicely on a padded white background row.

I have tried various ways of adding in an extra, unsemantic div but to no avail.

I have tried:

<div id="mydiv">

            <div class="wrap">

                <div class="row">

                    <div class="span4">
                        <ul>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                        </ul>
                    </div> <!-- .span4 -->

                    <div class="span4">
                        <ul>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                        </ul>
                    </div> <!-- .span4 -->

                    <div class="span4">
                        <ul>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                        </ul>
                    </div> <!-- .span4 -->

                </div> <!-- .row -->

            </div> <!-- wrap -->

        </div> <!-- mydiv -->

And also:

<div id="mydiv" class="row">

            <div class="wrap">

                    <div class="span4">
                        <ul>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                        </ul>
                    </div> <!-- .span4 -->

                    <div class="span4">
                        <ul>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                        </ul>
                    </div> <!-- .span4 -->

                    <div class="span4">
                        <ul>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                            <li>Random link</li>
                        </ul>
                    </div> <!-- .span4 -->

            </div> <!-- wrap -->

        </div> <!-- mydiv -->

The “wrap” div has the following CSS:

.wrap {
padding: 35px;
background-color: #F7F7F7;
border: 1px solid #DDD;

}

But each time, the row either gets pushed down to the next line or doesn’t wrap around the content at all.

I have previously managed to add padding by using an unsemantic div after the row but this time, it doesn’t seem to work.

Could anyone point me in the right direction?

Thanks.

  • 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-08T21:04:25+00:00Added an answer on June 8, 2026 at 9:04 pm

    Rather than adding an additional div for styling, you should just add another style to the row, e.g., row-padded, and pass new styles down to the children of it accordingly. For instance:

    CSS

    .row-padded {
      padding: 35px;
      background-color: #F7F7F7;
      border: 1px solid #DDD;
    }
    
    .row-padded .span4 {
      background-color: #bbb;
      width: 30%;
    }
    

    ​

    HTML

    <div id="mydiv" class="container">
    
      <div class="row row-padded">
    
        <div class="span4">
          <ul>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
          </ul>
        </div> <!-- .span4 -->
    
        <div class="span4">
          <ul>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
          </ul>
        </div> <!-- .span4 -->
    
        <div class="span4">
          <ul>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
            <li>Random link</li>
          </ul>
        </div> <!-- .span4 -->
    
    
      </div> <!-- .row -->
    
    </div> <!-- container -->​
    

    JSFiddle

    Note: You probably want to define a responsive explicit value (in px) for the .span4 .row-padded width rather than merely the percent width. I only used the percent for brevity.

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

Sidebar

Related Questions

I realise that this question has probably been asked to death, but none of
I realise that similar questions have been asked before however none of the solutions
I realise that Sharepoint in asp .net based but I have a PHP application
I realise that this might be a stupid question, but I have not come
I realize this question (or questions that look like this) have been asked over
I realise that if you have an iterable you should always use .join(iterable) instead
I realise that CSS transitions always apply to the class that's been added, not
I have researched the topic further and i realise that for an example to
I realise that the Java 8 lambda implementation is subject to change, but in
I realise that you can open the google maps app ready for directions by

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.