Click here to Skip to main content
15,881,248 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have Project Which Contain Default.css that is applied in all form.
But now i have one form in which i dont want default.css styles so how can i do that.?
Posted

You can give that form a class, like this:
HTML
<form class="yourClassHere" ...>

And in your default.css stylesheet, go to the rules for a form tag and make sure that you exclude the form with that class:
CSS
form:not(.yourClassHere) {
    /* style rules here */
}

And then, you can add some new rules, specific for that form:
CSS
form.yourClassHere {
    /* style rules here */
}
 
Share this answer
 
Comments
Member 10453691 18-Dec-14 4:16am    
form:not(.yourClassHere) {
/* style rules here */
}

Vs

form.yourClassHere {
/* style rules here */
}


I am not getting you exatly can you Please Expalin me once again.
Thomas Daniels 18-Dec-14 4:23am    
Those CSS rules make sure that your form does not get default.css styling rules, if you give it a class.
Member 10453691 18-Dec-14 4:30am    
yes i know that let me say one thing my form name is test.aspx now what i am writing in defualt.css then it will not take style of default.css
Thomas Daniels 18-Dec-14 4:32am    
So you want to make sure that default.css does not apply to one file, not to one <form>?
Member 10453691 18-Dec-14 4:34am    
Ok then i have to Do it in form is it possible?
You can give the id of your stylesheet link reference.

<link href="default.css" id="default" type="text/css" />

On page level, write below code.

<script type="text/javascript">
$(document).ready(function () {
$("#default").attr('href','');
});
</script>

This code is replace href link to particular style sheet at single form.
 
Share this answer
 
v2
Comments
Member 10453691 18-Dec-14 4:31am    
how can i implement above. i think these one is only for href

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900