Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

Align an element to bottom with flexbox

<style>
.content {
  height: 200px;
  border: 1px solid gray;
  display: flex;
  flex-direction: column;
}

button {
  margin-top: auto;
}
</style>

<div class="content">
  <h1>Hello World</h1>
  <button>Submit</button>	<!-- Aligned element -->
</div>
 
PREVIOUS NEXT
Tagged: #Align #element #bottom #flexbox
ADD COMMENT
Topic
Name
7+9 =