asp.net: Correct Size for imagebutton under Firefox

D

David

I have a web page with a Imagebutton that needs to be 1" square. I
created the button and set the width to "112px" and this works well
under IE 6x. However when I run the page under Firefox, the button is
very large, It appears that the server is NOT sending any the
style="width:112px;" portion of the HTML. Is there a way to force
asp.net to send this information for this control?

Thanks



Code for IE:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title="" src="Pin - 1 inch
square.jpg" border="0" style="width:112px;" />


Code for FF:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title=""" src="Pin - 1 inch
square.jpg" border="0" />
 
J

Jacky Kwok

David said:
I have a web page with a Imagebutton that needs to be 1" square. I
created the button and set the width to "112px" and this works well
under IE 6x. However when I run the page under Firefox, the button is
very large, It appears that the server is NOT sending any the
style="width:112px;" portion of the HTML. Is there a way to force
asp.net to send this information for this control?

Thanks



Code for IE:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title="" src="Pin - 1 inch
square.jpg" border="0" style="width:112px;" />


Code for FF:

<input type="image" name="Startpage_controlV21:Imagebutton1"
id="Startpage_controlV21_Imagebutton1" title=""" src="Pin - 1 inch
square.jpg" border="0" />


add 'Page.ClientTarget="ie5";' in the "Page_Load" event.

For the non-IE browser, Dotnet just will consider they are old browser
and cannot support new version HTML function ,e.g. inline style.
Although, FireFox can support inline style actually.


'Page.ClientTarget="ie5";' forces the Dotent outputs IE5 support HTML.


However, you need to check all other output carefully for any possible
non-compatible output.
 

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

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top