CSS Question - Overriding or slimming down element styles

G

Guest

Hi, apologies if this is out of scope but I cannot find a dedicated CSS
newsgroup..but I am using .net!

I have a css definition for the element 'input'. So it puts boxes round all
my inputs in black, 2px etc etc so i dont have to give each input a class
name in my html - this way it does it automatically. However .. when i create
an <asp:ImageButton> this also gets transformed on the client as an <input
type=image> therefore it picks up this style and i get horrible boxes around
my buttons. Rather than apply class=box to every single text input (there are
many) is there any way I can slim it down to

input type=text { style def } (tried this and doesnt work)
?? either that or override the style for an image and just make the style
blank?

Thanks.
 
G

Guest

You can either add a style element to each imagebutton:

<asp:ImageButton id="ImageButton1" runat="server" style="border: 0px"
imageurl="myimage.gif">

or you could create a new css class and use that:

<style>
INPUT.noborder {border: 0px;}
</style>

and

<asp:ImageButton id="ImageButton1" runat="server" cssclass="noborder"
imageurl="myimage.gif">

HTH

Alan
 
G

Guest

wicked. so you extend the class with input.whatever
simple in theory!
great thank you.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top