Width/Height for ImageButton not working

T

tshad

I have the following:

<asp:ImageButton ID="UpButton" text="Move Up" visible=false
runat="server" ImageUrl="../images/arrowUp.gif" Width="16px" Height="16px"
CommandName="Up" OnClick="moveRowUp" AlternateText="^"/><br>

Which is supposed to be valid.

I am trying to make the button size smaller and this works in IE, but not in
Mozilla. As a matter of fact, if you look at the viewsource for Mozilla the
Width and Height are gone (but they are there for IE).

I did:

style="height:16px;width:16px;"

And it does work.

Why doesn't the other? They are valid properties, according to MS. And why
would Mozilla take them out? I thought the rendering was done by IIS?

Thanks,

Tom
 
M

Mark Fitzpatrick

The rendering isn't done by IIS, IIS serves the request, but the actual
processing of the pages are done by ASP.Net. ASP.Net emits the HTML it
thinks is correct for the particular browser. Microsoft has always used
browser definitions from cyscape (http://www.browserhawk.com/). The problem
is, they haven't always updated those definitions for MS as frequently as we
would like. Thus, a lot of browsers may register as having a lesser set of
capabilities. You can add code to your web.config file that will define
newer browsers and their editions. Try running a search through this NG or
google for browser definitions in the web.config. I'm sorry I don't have a
URL on hand with a set of them.

Hope this helps,
Mark Fitzpatrick
Microsoft MVP - FrontPage
 

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