If you understand the code, then you can work out for yourself how to change it. (And if you don’t understand the code, you should be concentrating on doing so, rather than on finding yet another method. )
In your HTML snippet, no, there’s no difference. The only difference would be if you had multiple levels of divs in your HTML. You only have 1 level of div children below .fence so .fence > div and .fence div will select the same element.
It would matter if you had this sort of HTML.
<div class="fence">
<div>
<div>NOTE THAT ".fence > div" won't select me since I'm not a direct div child of ".fence", but ".fence div" will since ".fence div" doesn't care how deep in the HTML "div" is!</div>
</div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
<div></div>
</div>
Not to be rude, but did you not read @TechnoBear’s comment? Understand what you’re applying instead of throwing stuff against the wall and seeing what sticks.
It’s just like you could probably achieve that same affect using flex without all that additional markup (especially absolutely positioned which should be avoided as much as possible…). Or even use a svg background repeating pattern.
Or a quick and dirty way to get it without all the extra divitis. You have to set a fixed height on the container (I’m guessing there’s a way around it…) but it doesn’t require all the extra divs,
Sorry I wouldn’t use any of that pointless html. Your parent div and indeed your fence div are never used. The div inside the fence div is absolutely placed in relation to the curtain so the 2 outer divs you added are a bit superfluous.
I would simply use one line of css to do all the lines and only needs one div (it actually doesn;t need any if we added it on something else).
It won’t match exactly to the other one but is so close no one will notice.
Also notice that your green lines are different sizes for each other when you open/close the window because you have sized them in percent again which is not good for borders.