<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>nth-child &#8211; Blackbams Blog</title>
	<atom:link href="https://blog.blackbam.at/tag/nth-child/feed/" rel="self" type="application/rss+xml" />
	<link>https://blog.blackbam.at</link>
	<description>development - digital arts - internet</description>
	<lastBuildDate>Wed, 08 Apr 2015 22:27:14 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=6.8.1</generator>
	<item>
		<title>CSS: NTH-Child selector ignore hidden element</title>
		<link>https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/</link>
					<comments>https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/#respond</comments>
		
		<dc:creator><![CDATA[Blackbam]]></dc:creator>
		<pubDate>Wed, 08 Apr 2015 22:27:14 +0000</pubDate>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[nth-child]]></category>
		<category><![CDATA[selector]]></category>
		<category><![CDATA[~]]></category>
		<guid isPermaLink="false">https://blog.blackbam.at/?p=2223</guid>

					<description><![CDATA[Recently I discovered some short solution for ignoring a single hidden element with the nth-child selector. If you struggle with the same problem the following might be useful: This is the HTML: a b c d e The following CSS adds a margin right to every second visible element no matter which element has the cpw [&#8230;]]]></description>
										<content:encoded><![CDATA[<p>Recently I discovered some short solution for ignoring a single hidden element with the nth-child selector. If you struggle with the same problem the following might be useful:</p>
<p>This is the HTML:</p>
<pre lang="html">
<span class="video_prewrap">a</span>
<span class="video_prewrap">b</span>
<span class="video_prewrap">c</span>
<span class="video_prewrap cpw">d</span>
<span class="video_prewrap">e</span>

</pre>
<p>The following CSS adds a margin right to every second visible element no matter which element has the cpw class.</p>
<pre lang="css">
.cpw {
    display:none;
}

.video_prewrap {
    margin-right:20px;
}

.video_prewrap:nth-child(2n) {
    margin-right:0;
}

.cpw ~ .video_prewrap:nth-child(2n) {
    margin-right:20px;
}

.cpw ~ .video_prewrap:nth-child(2n-1) {
    margin-right:0;
}

</pre>
<p><a class="a2a_dd addtoany_share_save addtoany_share" href="https://www.addtoany.com/share#url=https%3A%2F%2Fblog.blackbam.at%2F2015%2F04%2F09%2Fcss-nth-child-selector-ignore-hidden-element%2F&#038;title=CSS%3A%20NTH-Child%20selector%20ignore%20hidden%20element" data-a2a-url="https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/" data-a2a-title="CSS: NTH-Child selector ignore hidden element"><img src="https://static.addtoany.com/buttons/share_save_120_16.png" alt="Share"></a></p>]]></content:encoded>
					
					<wfw:commentRss>https://blog.blackbam.at/2015/04/09/css-nth-child-selector-ignore-hidden-element/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
