My setup:
<div class="floatleft">
<div class="search">[..]</div>
</div>
<div class="floatleft">
<div class="submit">[..]</div>
</div>
My problem: I want to target the floatleft
if it contains search
. Is this possible in CSS? I want to make the text-input of search
100% wide, which can only be done by stretching floatleft
to 100% (don't blame me, it's code I can't change). However, if I just stretch floatleft
, it'll also stretch the other one (with the submit button) to 100%, which I don't want.
I've looked into Advanced CSS Selectors, but .floatleft > .search
targets search
if it's in floatleft
. I want to target floatleft
when it contains search
. Is there something in CSS that can select the parent DIV of a targeted DIV? Something like '.search < .floatleft > .floatleft` (if that makes sense)?