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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T14:01:51+00:00 2026-06-06T14:01:51+00:00

I have the following html divs : … <body> <div id=barChart_div style=width: 600px; height:

  • 0

I have the following html divs :

...
<body>
<div id="barChart_div" style="width: 600px; height: 250px;float:left; "></div>
<div id="stats_div" style="width: 350px; height: 250px; float:left;"></div>
<div id="lineChart_div" style="width: 600px; height: 250px; "></div>
<div id="cdfChart_div" style="width: 600px; height: 250px;"></div>
</body>
...

what I am trying to do is to display the first div ( contains a bar chart) and the second div(contains some text fro the chart) next to each other, then below them display the other two divs (contain other charts) one after the other vertically i.e. I want it to look like:

desired

and what i get currently is :

actual

cdfChart_div (div4) is getting displayed on top of lineChart_div(div3).
What CSS style do i need to use to fix this?

  • 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-06T14:01:59+00:00Added an answer on June 6, 2026 at 2:01 pm

    On the div that comes immediately after the floated stats_div:

    style="clear:left;"

    • jsFiddle Demo

    Full code:

    ...
    <body>
    <div id="barChart_div" style="width: 600px; height: 250px;float:left; "></div>
    <div id="stats_div" style="width: 350px; height: 250px; float:left;"></div>
    <div id="lineChart_div" style="clear:left; width: 600px; height: 250px; "></div>
    <div id="cdfChart_div" style="width: 600px; height: 250px;"></div>
    </body>
    ...
    

    Since stats_div is floated, its contents are taken out of the normal flow. Thus, the contents of the next div that is part of the normal flow does not make space for the contents of stats_div. You have have to clear one side of the next div if you want its contents to come after the contents of the previous floated div. Often you’ll see clear: both, which works on either edge of the normal flow div.

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

Sidebar

Related Questions

I have the following html code. <html> <body> <div style=max-width:1600px; min-width:900px; > <table> </table>
I have the following HTML snippet: Block 1: <div style="position: absolute; top: 105px; left:
I have a following HTML/CSS (simplified): <body> <style> body { margin: 0px; padding: 0px;
I have the following HTML code <html> <body> <div id=wrapper> <div id=header/> <div id=main/>
I have the following HTML snippet: <body> <div class=main> <div class=topBar> <p>testing</p> </div> <div
i have the following code: HTML <div id=step-holder> <div class=step-no>1</div> <div class=step-dark-left><a href=#>Basic details</a></div>
I have the following html code- <div class=search_results>...</div> <div class=search_results>...</div> <div class=search_results>...</div> The divs
I have the following code: HTML <div id=body></div> JS var site = { 'pageData'
I have a DIV with the following css .divTab { width: 700px; height: 550px;
I have the following HTML: <div id=root> <div id=left_side>LEFT</div> <div id=center_s>CENTER</div> <div id=right_side>RIGHT</div> </div>

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.