I have created a form on my web page and also define some input text field. Like:
<form id="form_id"> <input type="text" name="first_name" class="first_class"> <input type="text" name="second_name" class="second_class"> </form>
Now I want to change input text design, so I have define some CSS in my HTML code.
<style type="text/css"> .first_class{ background: transparent; color: orange; } .second_class{ background: transparent; color: orange; } </style>
But I want to apply multiple class name under one id in css. How can I do that?
If you want to apply multiple class name under one id in css. You can do it easily just something changes in CSS
This is your form:
<form id="form_id"> <input type="text" name="first_name" class="first_class"> <input type="text" name="second_name" class="second_class"> </form>
This is your CSS code:
<style type="text/css"> #form_id.first_class,.second_class{ background: transparent; color: orange; } </style>
Or try ti:
<style type="text/css"> #form_id.first_class,.second_class,.some_more_class,.some_more_class{ background: transparent; color: orange; } </style>
Question and answer is powered by AnsPress.io