css - Display first occurrence after a class that is nested -
To show the class .tab-wrapper , the rest should not be displayed < / P>
& lt; Ul class = "tabs" & gt; & Lt; Li & gt; 1 & lt; / Li & gt; & Lt; Li & gt; 2 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div class = "tab-cover" & gt; & Lt; Div class = "tab" & gt; Won & lt; / Div & gt; & Lt; Div class = "tab" & gt; & Lt; / Div & gt; & Lt; Div class = "tab" & gt; & Lt; Ul class = "tabs" & gt; & Lt; Li & gt; 1 & lt; / Li & gt; & Lt; Li & gt; 2 & lt; / Li & gt; & Lt; Li & gt; 3 & lt; / Li & gt; & Lt; / Ul & gt; & Lt; Div class = "tab-cover" & gt; & Lt; Div class = "tab" & gt; Won & lt; / Div & gt; & Lt; Div class = "tab" & gt; & Lt; / Div & gt; & Lt; Div class = "tab" & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt; & Lt; / Div & gt;
This is my CSS for some reason the other. The first tab of the tab is not displayed ... How do I fix it? Thanks
.tab-wrapper .tab {display: none;} .tab-wrapper .tab: first-child {display: block;}
This is working, however when I have copied or pasted your code, (of course, in Bella your CSS's The copy seems to work now. If you are trying to display the second Visible / code>, then you do not modify your methodology.)
.tab-wrapper .tab {display: none; } .tab-wrapper .tab: First-child {display: block; }
.tab
) to display: any
is not found. You can not see that it is not visible to parents.
Comments
Post a Comment