Cristiano Posted December 12, 2019 Share Posted December 12, 2019 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? Link to comment Share on other sites More sharing options...
niche Posted December 12, 2019 Share Posted December 12, 2019 (edited) 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 December 12, 2019 by niche Link to comment Share on other sites More sharing options...
dsonesuk Posted December 13, 2019 Share Posted December 13, 2019 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> 1 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now