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.

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.

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.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.