To override this kind of bootstrap element, you should use the !important
like following:
@media (min-width: 768px){
.navbar-header {
float: none !important;
}
}
It's actually working by doing this in your pen, as far as you also don't forget the { }
to your @media
declaration.
You can find more information about the !important
in the great article from Chris Coyier on CSS Tricks: When Using !important is The Right Choice.
EDIT:
Considering the comment of @APAD1 and in complement to the answer, calling your CSS files in the right order is a better way to fix your issue, in this case at least. So call Bootstrap CSS first, then your own custom CSS.
In the Codepen way, that means loading the Bootstrap CSS with "Add External CSS" in the properties of your CSS window, instead of loading it in the HTML.