Jump to content

Horizontal and vertical div's

Recommended Posts

I need to create the layout shown in the following image:


but the "GRAPH explanation" div goes below the "GRAPH" div (I use Plotly to create the graph).

Please, could someone tell me how to create the shown layout?

Share this post

Link to post
Share on other sites

float and div properties with graphs, tables and explanations inside the divs


giving each div a height and width might simply you understanding of div relationships on your page  

Edited by niche

Share this post

Link to post
Share on other sites

Use flex box

	<!doctype html>
 <html lang="en">
<meta charset="utf-8">
 <title>Document Title</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="author" content="">
<!--<link rel="stylesheet" href="css/styles.css?v=1.0"> -->
*{box-sizing: border-box;}
.layout-wrap { display: flex; min-height: calc(1px  +  40vw);}
	.layout-col1{ display: flex; flex: 1 1 100%; max-width: 40%;}
.layout-col2{display: flex; flex: 1 1 100%; max-width: 60%;  flex-wrap: wrap; justify-content: space-evenly; }
.layout-col2 >div, .layout-col1 >div { margin: 10px; border: 3px solid #000;}
.div1 {flex: 1 1 auto;}
.div2 { flex: 1 1 auto; max-width: 40%;  margin-right: 5px;}
.div3 { flex: 1 1 auto; max-width: 60%; margin-left: 5px;}
.div4 { flex: 1 1 100%; max-width: calc(100% - 20px);}
<!--<script src="js/scripts.js"></script> -->
<div class="layout-wrap">
    <div class="layout-col1">
          <div class="div1"></div>
     <div class="layout-col2">
<div class="div2"></div>
<div class="div3"></div>
<div class="div4"></div>


  • Like 1
  • Thanks 1

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...