Jump to content
Cristiano

Horizontal and vertical div's

Recommended Posts

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

image.png.5f393e5aaf72fe39fcb90b1532a32e82.png

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

EDIT:

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">
 <head>
<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"> -->
<style>
*{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);}
</style>
</head>
<body>
<!--<script src="js/scripts.js"></script> -->
<div class="layout-wrap">
    <div class="layout-col1">
          <div class="div1"></div>
     </div>
     <div class="layout-col2">
<div class="div2"></div>
     
<div class="div3"></div>
     
<div class="div4"></div>
     
     </div>
	</div>
</body>
</html>

 

  • 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.

Guest
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.

Loading...

×
×
  • Create New...