I am attempting to create a header with h2
text on the left and h4
on the right, positioned on the same line with equal height and some padding. Here is the code snippet I have written:
.alignleft {
float: left;
}
.alignright {
float: right;
}
.nav {
clear: both;
}
.nav {
background-color: grey;
}
<div class="nav">
<h2 class="alignleft">Left side</h2>
<h4 class="alignright">RIGHT SIDE</h4>
</div>
If you'd like to see the code in action, check out this fiddle. Any assistance would be greatly appreciated.