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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T01:23:16+00:00 2026-06-12T01:23:16+00:00

I’m trying to figure out how to position a div within a div within

  • 0

I’m trying to figure out how to position a div within a div within another div. Is that even possible? I have seen a few articles on positioning a div within another div and none of them made sense to me. I am somewhat new to CSS and I’m still trying to grasp the concept.

Basically I’m trying to use positioned divs to create a custom table-like effect. I have my main div that is centered on the page 1000px wide and 1200px tall. Then I have another two divs within that one that separates it into left and right columns each 500px wide and 1200px tall. I have gotten that part easily. I am now trying to use another div in the right column to push my text down. On the top I have a picture that is 300px tall and 500px wide. I want the text to be just below the picture.

HTML code:

<div id="mbody" style="position:relative;">    

    <div id="lbody" style="position:absolute;">  

        Some Text

    </div>

    <div id="rbody" style="position:absolute; right:0;">  

        <img src="photo.jpg" height="300" width="500">

        <div style="position:absolute; width:500; height:1200; top:350;">

            Some Text

        </div>

    </div>

</div>

CSS code:

#mbody{
    margin: 0px;
    margin-left:auto;
    margin-right:auto;
    top:-73px;
    border: 2px solid green;
    width: 1000px;
    height:1200px;
    background: black;
    z-index:1;
}
#lbody{
    margin: 0px;
    padding:0px;
    left:0px;
    border:2px solid red;
    width:500px;
    height:1200px;
    background:black;
}
#rbody{
    margin: 0px;
    padding:0px;
    border:2px solid blue;
    width:500px;
    height:1200px;
    background:black;
}

Please keep in mind that I am new to css and still learning. If anyone answers can you please answer in such a way that even a beginner like me can understand. Thanks in advance.

  • 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-12T01:23:17+00:00Added an answer on June 12, 2026 at 1:23 am

    You need to add ‘#’ before all the div id names in your css
    eg. #mbody, #lbody, etc.

    Only then will the html know that you are assigning values to the divs

    Also, to have an image appear above the text on the right column can be achieved by
    <img src="photo.jpg" height="300" width="500" style="float:right;">

    Also, it usually helps during the design stage to give a background colour in the css
    for eg.
    #lbody {background:red;}
    This will help you see how the css translates on screen.

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

Sidebar

Related Questions

I'm trying to decode HTML entries from here NYTimes.com and I cannot figure out
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I have a French site that I want to parse, but am running into
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have a text area in my form which accepts all possible characters from
I know there's a lot of other questions out there that deal with this
I'm trying to create an if statement in PHP that prevents a single post
I am trying to loop through a bunch of documents I have to put
I have a small JavaScript validation script that validates inputs based on Regex. 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.