Created
August 22, 2018 11:09
-
-
Save rubys/a98cf90cd7e324b61bd8772d9dcaa6e1 to your computer and use it in GitHub Desktop.
if the first item in a div is an h3, don't put a border on it
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<style> | |
h3 {border: 1px solid black} | |
div>h3:first-child {border: none} | |
</style> | |
<div> | |
<h3>..</h3> <!-- no border on h3 --> | |
<p>....</p> | |
</div> | |
BUT | |
<div> | |
<p>....</p> | |
<h3>...</h3> <!-- would have a border on h3 --> | |
</div> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment