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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T13:26:57+00:00 2026-06-15T13:26:57+00:00

I want to make a layout where the container div has 4 children divs

  • 0

I want to make a layout where the container div has 4 children divs which are expanding from corners of the container div. Each div expands from one corner. I want to achieve this without setting position absolute to the childreen because this messes with my other css. This is where it stopped:
jsFiddle: http://jsfiddle.net/XcKYF/2/

<div class=container>
<div class=div1>11</div>
<div class=div2>22</div>
<div class=div3>33</div>
<div class=div4>44</div>
</div>

.container
{
width:100%;
height:100%;
background-color:red;
}
.div1
{
position:absolute;
bottom:0;
left:0;
width:20px;
height:20px;
background-color:green;
}
.div2
{
position:absolute;
bottom:0;
right:0;
width:20px;
height:20px;
background-color:yellow;
}
.div3
{
position:absolute;
top:0;
left:0;
width:20px;
height:20px;
background-color:blue;
}
.div4{
position:absolute;
top:0;
right:0;
width:20px;
height:20px;
background-color:violet;}
  • 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-15T13:26:58+00:00Added an answer on June 15, 2026 at 1:26 pm

    Demonstration: http://jsfiddle.net/94U4U/1/

    I think what you are looking for is a relatively positioned container that takes up the page, which is divided up into 4 corners plus a central content holder:

    html, body{
      height:100%;
    }
    .container
    {
      position:relative;
      width:100%;
      height:100%;
      background-color:red;
    }
    
    .container div.corner{
      height:20%;
      width:20%;
      position:absolute;
    }
    
    .container div.content{
      background-color:white;
      height:60%;
      width:60%;
      position:absolute;
      left:20%;
      top: 20%;
    }
    
    .div1
    {
      bottom:0;
      left:0;
      background-color:green;
    }
    
    .div2
    {
      bottom:0;
      right:0;
      background-color:#FF0;
    }
    
    .div3
    {
      top:0;
      left:0;
      background-color:blue;
    }
    
    .div4
    {
      top:0;
      right:0;
      background-color:#EE82EE;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I want a two-column div layout, where each one can have variable width e.g.
I want make a bash script which returns the position of an element from
I want to make a layout with a rounded border. How can I apply
How can I make layout almost fullscreen ? I mean I dont want there
Layout is FreeDesign I want to make less space between JLabel and JFrame in
JSFIDDLE EXAMPLE BELOW I want to make the following CSS layout and currently im
What I want to achieve I'm trying to make a layout equal to the
I want to make a custom container, usable in MXML like: <local:MyContainer> <s:Label/> <s:Button/>
I have a MVC3 application, based on default layout from VS 2010, which I
I want to make a simple two column layout, where the right column is

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.