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

The Archive Base Latest Questions

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

The situation is: HTML: <div id=main> <div id=a></div> <div id=b>Some Text</div> </div> CSS: #a{

  • 0

The situation is:

HTML:

<div id="main">
    <div id="a"></div>
    <div id="b">Some Text</div>
</div>

CSS:

#a{
    float:left;
    width:800px;
    height:150px;
    background-color:#CCC;
}

#b{
    width:1000px;
    height:100px;
    background-color:#9CC;
}

The result:
enter image description here

Why doesn’t the text go behind div#a ? Why does “Some Text” behave as if div#a is still in the normal flow? How to force the text to act as expected (to go under div#a) ?

UPDATE:
When I mean under, I mean beneath on the Z axis, not on the Y. The div’s should stay in this position, the only part that needs moving is the text.

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

    http://www.w3.org/wiki/CSS/Properties/float

    • left
    The element generates a block box that is floated to the left.
    Content flows on the right side of the box, starting at the top.

    The content of #b is acting as it should. It floats to the right side of the floated element preceding it.

    Thus, if you want a ‘layered’ effect, use a CSS declaration that will provide it properly: position

    Note: to keep #a positioned to it’s parent, rather than <body>:

    #main { position:relative }
    #a { position:absolute }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

The situation is: The CSS: <style> #aux1{ position:relative; background-color:#ccc; width:100%; height:200px; } #aux2{ display:block;
I've got the following situation: <html> <head> <title> Title </title> <style type=text/css> #wrapper {
Suppose I have the following html: <div style=width:200px;height:200px;overflow:scroll> ... </div> If the stuff in
This is the situation... HTML: <div id=cw> <div id=c></div> </div> <a href=#>click me</a> CSS:
So i have the following situation in my html file: <div id = imagePreview>
I have following Situation, Server A sends some data (HTML form) to server B,
I have the following situation. My project has a main.scala.html file and a folder
I have the following HTML snippet: Block 1: <div style="position: absolute; top: 105px; left:
I have the following simple code : HTML: <div> <img src='http://i51.tinypic.com/4kz4g5.jpg' /> </div> CSS:
I've got situation: <div id=main> <div id=a></div> <div id=b></div> </div> On my web page,

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.