Skip to content

Instantly share code, notes, and snippets.

@maskingtape
Created September 26, 2012 14:00
Show Gist options
  • Save maskingtape/3788232 to your computer and use it in GitHub Desktop.
Save maskingtape/3788232 to your computer and use it in GitHub Desktop.
Two elements, vertical alignment bottom, variable height and width
/**
* Two elements, vertical alignment bottom, variable height and width
*/
header {
display: table;
border-collapse:collapse;
height: 180px;
margin: 0 auto;
}
h1 {
width: 500px;
background-color: green;
color: white;
display: table-row;
}
h1 a {
display:table-cell;
min-width:200px;
color:white;
vertical-align: bottom;
}
h1 span {
display:table-cell;
width:340px;
vertical-align: bottom;
}
<header>
<h1>
<a href="#">test</a>
<span>test</span>
</h1>
</header>
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment