0

Hello,

I have this issue that the input tag has a class that's the same as other input tag.
I want to change the icon to something else but it affects the other input that's not related to the icon.
I wonder if it is possible to create a css based on the input's div parent.

<div id="search">
  <input type="submit" id="edit-submit" name="op" value="Search" class="form-submit">
</div>

so in CSS i would like to link the .form-submit class to the div#search so it does not affect other inputs.
I was thinkig of something like this

div#search#edit-submit.form-submit 
{
}

but this does not work.

Thank You.

1
Contributor
2
Replies
3
Views
5 Years
Discussion Span
Last Post by Scu
0

Hello,

I solved my issue
It was simple, but the only thing i didn't try

div#search input#edit-submit.form-submit
{
}

So, the only thing missing was a space.

I posted the answer for someone who'll find this post and find it useful.

0

Is there a form to make the reverse of this. That is, I want to modify the #search parent based on the .form-submit child value.

So, for the example in the last post, I want the css to modify the div#search and not the input#edit-submit.form-submit but this should be the condition for it to modify.

Thanks.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.