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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T02:16:03+00:00 2026-06-05T02:16:03+00:00

I have 4 divs that are set to float left but the end div

  • 0

I have 4 divs that are set to float left but the end div keeps wrapping two a new line on a smaller screen which is really annoying me…i want them to scale with the screen size so they always stay on the same line regardless of screen size… and im trying not to use a table (which is very tempting giving they v.reliable for this!!!)

I’m wondering how to fix this annoying issue so they always stay in position regardless of screen size??

I have this as my CSS:

.wrapper{
    margin:0 auto;
    width: 80%;
    display: table-cell;
}
.gridf{
    float:left;
    margin-right:3px;
    width:200px;
    min-height:200px;
    border:1px solid white;
}
.grid{
    float:left;
    margin-left: 3px;
    margin-right:3px;
    width:200px;
    min-height:200px;
    border:1px solid white;
}
.gridl{
    float:left;
    margin-left: 3px;
    width:200px;
    min-height:200px;
    border:1px solid white;
}

My HTML:

<div style="overflow: hidden;">

 <div class="wrapper">

        <div class="gridf"></div>
        <div class="grid"></div>
        <div class="grid"></div>
        <div class="gridl"></div>

 </div> 



</div>

Please help 😀

  • 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-05T02:16:04+00:00Added an answer on June 5, 2026 at 2:16 am

    Hi i think you should this check to this demo

    .wrapper {
      margin: 0 auto;
      width: 80%;
      border: solid 1px red;
      overflow: hidden;
    }
    .gridf,
    .grid,
    .gridl {
      Background: green;
      width: 24%;
      min-height: 100px;
      float: left;
      margin: 2px 0;
    }
    .gridf {} .grid {
      margin: 2px 1%;
    }
    .gridl {
      background: yellow;
    }
    <div class="wrapper">
    
      <div class="gridf">One</div>
      <div class="grid">Two</div>
      <div class="grid">Three</div>
      <div class="gridl">Four</div>
    
    </div>
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have two divs that are sliding from right to left. I am having
I have a container div that holds two internal divs; both should take 100%
I have 2 divs that have full height, one on the left and one
I have a div that is set to 100% height, and it renders perfectly,
I've got a parent div floated left, with two child div s that I
I want to have an inner div that sites inside different sized container divs,
I have an HTML file that has a set of divs with the class
basically I have 4 images with divs set up like this: <div id=selector> <div
I trying to have a div with child divs that form 2 or more
I'm trying to display two <div> elements on the same line, but in the

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.