3 ms·
You don't need the classes on the alert sub-elements: <div class="alert"> <img src="/img/logo.svg" alt="ChitChat Logo" /> <div> <h2>ChitChat</h
by perilunar 1y ago
You don't need the classes on the alert sub-elements:
<div class="alert">
<img src="/img/logo.svg" alt="ChitChat Logo" />
<div>
<h2>ChitChat</h2>
<p>You have a new message!</p>
</div>
</div>
Then the CSS is just:
.alert {...}
.alert img {...}
.alert h2 {...}
.alert p {...}
You can probably also get rid of the nested div by using flex, floats, or margins.