Created
August 23, 2011 03:33
-
-
Save bradmontgomery/1164283 to your computer and use it in GitHub Desktop.
Trying out nth-child(3n)
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
<html> | |
<head><title>nth child</title> | |
<style type="text/css"> | |
ol.items { color: red; padding: 20px; border: 1px solid red; clear: both; margin: 20px; min-height: 110px; width: 490px;} | |
ol.items li { display: block; padding: 5px; margin: 5px; border: 1px solid #aaa; float: left; width: 100px; } | |
li:nth-child(3n) { color: orange; background-color: yellow; } | |
</style> | |
</head> | |
<body> | |
<ol class="items"> | |
<li>one</li> | |
<li>two</li> | |
<li>three</li> | |
<li>four</li> | |
<li>five</li> | |
<li>six</li> | |
<li>seven</li> | |
<li>eight</li> | |
<li>nine</li> | |
<li>ten</li> | |
</ol> | |
</body> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment