Suppose I have this html:
<form action="url" method="post" class="simple-search">
<input type="hidden" name="var1" value="v1" />
<input type="hidden" name="var2" value="v2" />
<span class="fieldgroup">
...
</span>
<span class="fieldgroup">
...
</span>
<span class="fieldgroup">
...
</span>
</form>
and I want to style the first <span class="fieldgroup">
. When I do this:
form.simple-search span.fieldgroup:first-child {
margin-left: 0;
}
it will not work because I have the input elements before the spans. Is there any way to achieve this without changing html and adding new class names?