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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T16:16:11+00:00 2026-06-11T16:16:11+00:00

I am trying to create a website the is contained of 8 divs. each

  • 0

I am trying to create a website the is contained of 8 divs.
each div has a different height (same width).

The divs should be aligned one next to the other according the browser screen resolution in the following way:

 _________________________
|                         |
| ##### ##### ##### ##### |
| ##1## ##2## ##3## ##4## |
| #####       ##### ##### |
|       ##### ##### ##### |
| ##### ##6##       ##### |
| ##5## ##### ##7##       |
| #####             ##8## |
|_________________________|

The idea is that once a user has a smaller width, the divs will become 3 columns in the following way:

 ___________________
|                   |
| ##### ##### ##### |
| ##1## ##2## ##3## |
| #####       ##### |
|       ##### ##### |
| ##### ##5##       |  (There will be a scrollbar if needed)
| ##4## ##### ##### |
| #####       ##6## |
| ##### ##8## ##### |
| #####             |
|                   |
| ##7##             |
|___________________|

and if the user has a wider screen resolution, there will be 5 columns

 _______________________________
|                               |
| ##### ##### ##### ##### ##### |
| ##1## ##2## ##3## ##4## ##5## |
| #####       ##### ##### ##### |
|       ##7## ##### #####       |
| #####       #####             |
| ##6##                         |
| #####       ##8##             |
|_______________________________|

Please notice that the padding between the cells and the cols stays the same.

Also notice that the order of the divs should be kept the same, meaning if you count from left to right it should preserve the order of 1-8.

it should support IE8

I appreciate your assistance!

  • 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-11T16:16:12+00:00Added an answer on June 11, 2026 at 4:16 pm

    set your divs to use display: inline-block; this will ensure each row isn’t staggered.

    then use css3 media queries to account for the various screen sizes.

    tutorial about media queries. http://webdesignerwall.com/tutorials/css3-media-queries

    DEMO: http://jsfiddle.net/tgdYq/ (resize the pane with the output)

    as a quick example:

    div {
        display: inline-block;
        width: 25%;
    }
    
    @media screen and (max-width: 420px) {
      div {
        width: 33%;
      }
    }
    
    @media screen and (min-width: 1200px) {
      div {
         width: 20%;
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to create a gallery for my website, so i use max-height/width to
My website container has a width of 95%. I'm trying to create a navigation
I am trying to display a different website on each day of the week.
http://www.indofolio.com/ , I'm trying to create a website with similar function to this one,
I'm trying to create a drop-down menu, similar to the one at NASA's website.
Rather than trying to create tons of different pages on my website, I'm trying
I'm busy trying to create a website for my football team. The thing I'm
I'm a total noob trying to create a website with PHP. I created a
I'm trying to create a new ASP.NET website and add it to my subversion
I am trying to create a text highlight option for my website. But I

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.