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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T18:14:27+00:00 2026-06-12T18:14:27+00:00

<html> <head> <style type=text/css> .parent { width: auto; height: auto; min-width: 600px; min-height: 600px;

  • 0
<html>
<head>

<style type="text/css">

.parent
{
    width: auto;
    height: auto;
    min-width: 600px;
    min-height: 600px;
    border: 1px dashed #f00;
    padding: 5px;
    overflow: auto;
    position: absolute;
}

.child
{
    width : 100px;
    height: 500px;
    border: 1px solid #0f0;
    float: left;
    position: relative;
}
.second_child
{
    width : 1800px;
    height: 100px;
    border: 1px solid black;
    float: left;
    position:relative;
}
</script>

</style>

</head>

<body style="overflow:auto">

<div class="parent">
    <div class="child">
    </div>
    <div class="second_child">
    </div>
</div>
</body>
</html>

I’m trying to put two box in a bigger box. I got it next to each other and it works fine now if I expand the second box width to larger then the width of the window.
Example your screen is 1024×720 the width of the second box is 1800px the second box repositions underneath the first box. I’m just curious why it does that and not put a scroll bar and keep the position of the objects.

Am I positioning it wrong, or am I thinking about this in a wrong manner. I’m almost to tempted to try this with a table as a layout but that seems so counter intuitive to me.

  • 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-12T18:14:28+00:00Added an answer on June 12, 2026 at 6:14 pm

    That’s the essence of floating DOM elements. They don’t force anything. If you want them to stay side by side, you need to give the container a width to support the contents (> 1904px).

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

Sidebar

Related Questions

I have some HTML Code: <html> <head> <title>css test</title> <style type=text/css> .box{width:100%;float:left;background:red} </style> </head>
html <html> <head> <style type="text/css"> body { background-color: transparent; color: white; } </style> </head>
<html><head><style type=text/css> #foo { color: blue; } a.bar { color: red; } #foo .baz
<html> <head> <style type=text/css rel=stylesheet> * {margin:0;padding:0;} div#box {background-color:green;width:1000px;} /* #box {position:absolute;top:0;right:0;} */ /*
<html> <head> <link type=text/css rel=stylesheet `href=file:///C:/Users/Documents/style.css /> <script type=text/javascript src=file:///C:/Users/Documents/jquery-`1.7.1.js></script> <script type=text/javascript `src=file:///C:/Users/Documents/jquery.tablesorter.js></script> <script
<html><head> <link type=text/css rel=stylesheet href=file:///C:/Users/Documents/style.css /> <script type=text/javascript src=file:///C:/Users/Documents/jquery-1.7.1.js></script> <script type=text/javascript src=file:///C:/Users/Documents/jquery.tablesorter.js></script> <script type=text/javascript>
In the code below: <html> <head> <style type=text/css> ul { list-style-type:none; margin:0; padding:0; }
I have sample site: /index.html /appcache.manifest /style.css /test.js index.html: <!DOCTYPE HTML> <html manifest=appcache.manifest> <head>
In my HTML file, I have: <html><head> <style>html{width: 320px; } body {padding: 0; margin:
For example, in that html code I add list-style-type: none; in external test.css. When

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.