+ 1

Plz,can anyone help me with this code ? I want to understand how the code exactly colored the line 2 and 3 in the second table ?

this is the code, sorry I tried to copy it and paste it here , but sadly with no success 👎 https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_id2

6th May 2017, 2:47 PM
abdelaziz koutkout
abdelaziz koutkout - avatar
6 odpowiedzi
+ 2
table#t01 tr:nth-child(even) { background-color: #eee; } table#t01 tr:nth-child(odd) { background-color:#fff; } Odd and even are keywords that can be used to match child elements whose index is odd or even (the index of the first child is 1). - w3schools And so, Jill's row is #eee, since it is tr:2 (even)
6th May 2017, 3:42 PM
Hsn
Hsn - avatar
+ 2
thanking you @§hasan§
6th May 2017, 3:57 PM
abdelaziz koutkout
abdelaziz koutkout - avatar
+ 1
the code isnt complete.. i'am trying to copy it from w3school, bit everytime it is nota complete 😬 the styling is internal in the complete code.. so there is no external css.. this is the code with the output : https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_id2
6th May 2017, 3:19 PM
abdelaziz koutkout
abdelaziz koutkout - avatar
+ 1
Html is incomplete too.
6th May 2017, 3:19 PM
Calviղ
Calviղ - avatar
+ 1
cannot copy it successfully from the w3schools site 😬 I have no computer access .. here is the link again if anyone wanna help and thanks 🙏❤ https://www.w3schools.com/html/tryit.asp?filename=tryhtml_table_id2
6th May 2017, 3:22 PM
abdelaziz koutkout
abdelaziz koutkout - avatar
+ 1
background-color: #eee; for grey and #fff; for white
6th May 2017, 4:42 PM
Antoine Senecal
Antoine Senecal - avatar