html - Why can't I use nth-child on mark tags? -


nothing in code overwrites selector, i'm confused why it's not working. i've googled , asked few friends , don't know. checked server wasn't taking while update page updating text , seems fine.

css

mark {     color: #ccc;     background: #333;     padding: 5px;     margin: 5px; } mark:nth-child(even) {     background: #000; } 

html

<p><mark>warri0r</mark>yes</p> <p><mark>j3w1sh</mark>no</p> <p><mark>mrguy</mark>i don't know</p> <p><mark>explode_</mark>maybe...</p> <p><mark>usausausa</mark>why not?</p> <p><mark>samuel01</mark>absolutely</p> 

mark:nth-child(even) doesn't work because child of <p>.

rewrite css:

p:nth-child(even) mark {     background: #000; } 

(select <mark> of <p>)

http://jsfiddle.net/hbxk3owh/


Comments

Popular posts from this blog

c# - Better 64-bit byte array hash -

webrtc - Which ICE candidate am I using and why? -

php - Zend Framework / Skeleton-Application / Composer install issue -