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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T03:27:32+00:00 2026-05-14T03:27:32+00:00

I am not a CSS expert (mainly because I haven’t had the need to

  • 0

I am not a CSS expert (mainly because I haven’t had the need to use much HTML/CSS stuff lately), so I came up with the following style/divs to create a 4 column layout:

    <style type="text/css">
        <!--
        .columns:after {
            content: ".";
            display: block;
            height: 0;
            clear: both;
            visibility: hidden;
        }
        * html .columns {height: 1%;}
        .columns{ display:inline-block; }
        .columns{ display:block; }
        .columns .column{
          float:left;
          overflow:hidden;
          display:inline;
        }
        .columns .last{ float:right; }
    
        .col4 .first{ left: auto;width:25%; }
        .col4 .second{ left: auto;width:25%; }
        .col4 .third{ left: auto;width:25%; }
        .col4 .last{ left: auto;width:25%; }
        -->
    </style>

note: most of this stuff comes from this google result, I just adapted it to 4 columns.

The HTML then looks like this:

<div class="columns col4">
 <div class="column first”> SOME TEXT  </div><!-- /.first -—>
 <div class="column second”> MORE TEXT</div><!—- /.second -—>
 <div class="column third”> SOME MORE TEXT </div><!—- /.third -->
 <div class="column last”> SOME LAST TEXT </div><!-- /.last -—>
</div><!-- /.columns -->

Ok, I’ve simplified that a bit (there’s a small image and some < h2 > text in there too) but the thing is that I’d like to add some space between the columns. Here’s how it looks now:
Columns And Space

Do you have any idea what CSS property should I touch?

note: If I add margin or padding, one column shifts down because (as I understand it) it doesn’t fit. There might be other CSSs as well, since this came in a template (I have been asked for this change, but I didn’t do any of this, as usual).

Thanks for any insight.

  • 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-05-14T03:27:32+00:00Added an answer on May 14, 2026 at 3:27 am

    You need to add padding to the columns. But when you do that, you also need to subtract the same amount from the width property. This i because of the box-model.

    .col4 .first{ left: auto;width:24%; padding-right:1% }
    .col4 .second{ left: auto;width:24%; padding-right:1% }
    .col4 .third{ left: auto;width:24%; padding-right:1% }
    .col4 .last{ left: auto;width:24%; padding-right:1% }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$(document).ready(function() { $(span.link).mouseover(function(e){ $(this.children).css(display,inline); }); }); I'm not a javascript expert, but I've cobbled
I want: all links which not contained filename (not .html, .jpg, .png, .css) redirect
Honestly I'm very bad at CSS and not good at dealing with color /
The CSS syntax highlighting in vim is not entirely optimal. For example: div.special_class stops
The CSS rules visibility:hidden and display:none both result in the element not being visible.
Is there a way to make a Radio Button enabled/disabled (not checked/unchecked) via CSS?
Not very technical, but... I have to implement a bad words filter in a
Not sure if this is possible or if I'm expressing correctly what I'm looking
(Not related to versioning the database schema) Applications that interfaces with databases often have
Not really getting the point of the map function. Can anyone explain with examples

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.