Search
 
SCRIPT & CODE EXAMPLE
 

HTML

flexbox column layout

<!--Please give a thumbs up if this was helpfull-->

<div class="container">
  <div class="item">
    <p>1</p>
  </div>
  <div class="item">
    <p>2</p>
  </div>
  <div class="item">
    <p>3</p>
  </div>
  <div class="item">
    <p>4</p>
  </div>
  <div class="item">
    <p>5</p>
  </div>
  <div class="item">
    <p>6</p>
  </div>
</div>

<style>
:root{
  --padding:10px;
  --one-third-width: 33.33%;
  --white: #FFFFFF;
}

.container{
  width:300px;
  height:300px;
  display:flex;
  dlex-direction:row;
  justify-content:space-between;
  flex-wrap:wrap;
  row-gap:10px;
}


.item{
  background:red;
  display:inline-flex;
  color:var(--white);
  width:calc(var(--one-third-width) - 30px);
  height:50%;
  padding:var(--padding);
}

p{  
  padding:var(--padding);
  margin: 0;
}
</style>
Comment

Simple Layout using Flexbox

.container {
  display: -webkit-flex;
  display: flex;
}
nav {
  width: 200px;
}
.flex-column {
  -webkit-flex: 1;
          flex: 1;
}
Comment

PREVIOUS NEXT
Code Example
Html :: examples of metadata 
Html :: how to do anchor in jupyter notebook markdown 
Html :: add title attribute 
Html :: icon for right arrow 
Html :: html form tag 
Html :: md-autocomplete 
Html :: javascript access collections of elements 
Html :: How many heading tags are there in HTML5? 
Html :: h3 html 
Html :: jquery html button 
Html :: html classes 
Html :: HTML <figure and <figcaption Elements 
Html :: haml to html 
Html :: default value to select simple form for 
Html :: how to make a div a checkbox html 
Html :: metro ui 
Html :: source html 
Html :: how to set option size to select in html css 
Html :: How to lazily load images or load only when scrolled 
Html :: petition to get rid of pigeons 
Html :: how to take space in fontawesome unicode 
Html :: ok siri 
Html :: json html encode 
Html :: how to add horizontal line in html without css 
Html :: python snippet to convert html file to .csv file 
Html :: c# how to get src from html img 
Html :: how to make a scroll horizontally button in html 
Html :: vmware workstation ubuntu 16.10 
Html :: html open gmail mailto 
Html :: desactiver un boutton react 
ADD CONTENT
Topic
Content
Source link
Name
9+4 =