mhulse / css-issues

Practical CSS code snippets and examples.
11 stars 1 forks source link

Why display none on first child? #118

Closed mhulse closed 6 years ago

mhulse commented 7 years ago
/*
Simple two-column:
<div class="box">
    <(any element)>
    <(any element)>
</div>
*/

.box > :first-child { display: none; }
@media (min-width: 737px) {
    .box::after {
        content: "";
        display: table;
        clear: both;
    }
    .box > :first-child {
        width: 300px;
        float: left;
        display: inline;
    }
    .box > :last-child { margin-left: 340px; }
}
mhulse commented 6 years ago

Fixed.