dotNET
dotNET

Reputation: 35450

Apply style on form defined in master page

How do I apply a css style on a container (<form>) element that is defined in the master page of my current page?

Details

I need to define <form> element in the master page because the master page contains a few server and client side controls for the navigation bar. Now in my child page (or whatever it is called) I need to apply a style to the <form> element that is specific to this child page only. Is it possible through some css selector or something? Note that I can't define a <form> element in the child page because nested forms are not allowed.

Upvotes: 0

Views: 108

Answers (1)

mason
mason

Reputation: 32699

From the client's perspective, there's no difference between master and regular pages. They're all merged into a single document.

So this should work just fine.

On the master page...

<form runat="server">

On the client page...

<style>
form {background-color: white}
</style>

Upvotes: 1

Related Questions