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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:22:28+00:00 2026-06-15T11:22:28+00:00

I want to achieve a layout where the outer div is 100% width and

  • 0

I want to achieve a layout where the outer div is 100% width and height. In this div I will add more divs dynamically. I want to write a css structure that splits the outer div so that each div gets the same space. Actually I want to create a dynamic grid with div elements.
Examples below:
enter image description here

  • 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-15T11:22:29+00:00Added an answer on June 15, 2026 at 11:22 am

    The answer of “Sowmia” is so good but one thing :
    you want to sub div have AUTO SIZE and with is solution you can’t do this.
    my solution is exactly the Sowmia’s answer with some changes:

    <style type="text/css" >
    .main{width:100%;  height:100%;  background:#F5D0A9; overflow:auto}
    .sub{width:auto;  
        height:auto;
        float:left;
        background:#8181F7;
        margin:4px;  
       border:solid 1px #2ECCFA}
    </style>
    

    and html:

    <div class="main">
    <div class="sub"></div>
        <div class="sub">this is div number 1</div>
        <div class="sub">this is div number 2</div>
        <div class="sub">if you have a big text this div is bigger than the other
        <br />
        even you can have a text with some height
            </div>
    </div>
    

    and this is :
    DEMO

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

Sidebar

Related Questions

The layout I want to achieve is pretty simple. I want a 100% height
I want to achieve hide/show with div's in html but in this way. Here
I want to achieve following layout: with following code: <div class=m> <div class=l></div> <div
Now layout look like this What I want to achieve is this <style type=text/css>
In short, I want to achieve this layout using swing: Notice two main objectives:
I want a Layout like this: But my code doesn't work. I can't achieve
I want to make a layout where the container div has 4 children divs
What I want to achieve I'm trying to make a layout equal to the
First let me tell you what I want to achieve. I want a layout
I want to achieve the effect that is used on this Header on this

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.