views:

35

answers:

4

So for example, I have a lovely button control:

<asp:Button ID="Button1" runat="server" Text="Button" />

Which when renders, is a lovely dull grey, nice and rectangular, etc, etc.

I know I can apply a new CSSClass to amend the CSS of said control, but where can I find the original CSS properties for this?

I appreciate this is a stupid question : )

+1  A: 

Not sure for all controls but for basic ones like buttons browsers usually have their own default definitions.

For Firefox, for instance, you can find a bunch of stylesheets files in its installation folder:

C:\Program Files\Mozilla Firefox\res

Developer Art
+1  A: 

There isn't a css class in the sense of what your talking about. Each browser has its own "css" style for standard html controls (buttons,radio,text boxes). You can however make a css class to override any browser styling.

nick
+4  A: 

This is the default style by the browser, not the ASP.NET control and you won't find a style you can edit for each user of the web. For instance, if you look at an ASP.NET button in Mozilla and IE they will look a little different.

If you want to style them, use CSS as you said.

webnoob
A: 

If it's a normal HTML button when rendered in the browser, you can use something like this in CSS:

#button1

{
 background-image:url(path-to-image/button1_sprite.png);
 background-repeat:no-repeat;
 background-position:left;
 background-color:#ffffff;
 border:none;
}

Then it will change the look of your <button> tag :)

Kyle Sevenoaks