IE vs FireFox and Netscape

  • Thread starter Thread starter Charles A. Lackman
  • Start date Start date
C

Charles A. Lackman

Hello,

I have a web site built in Framework 1.1.

I have the page set to SnapToGrid and ShowGrid and added buttons and
textboxes with specific sizes and locations for each control.

It works great in IE, however, in FireFox and Netscapte the textboxes and
buttons are the wrong size (some of the labels are in the wrong location
too).

How do I work around this?

Any assistance will be greatly appreciated.

Thanks,

Chuck
 
First of all, I would recommend moving away from 1.1 as soon as possible,
since many webhosting services have stopped (or soon will stop) supporting
anything earlier than 2.0, not to mention there are some major improvements
in 2.0 such as Master Pages. But back to your question, the first thing I
would do is take a look at the generated code to make sure it is exactly
what you expected. Sometimes ASP.NET uses an HTML attribute when you
actually wanted it to use CSS. Another thing that I often find useful when
working on the design and layout of elements for a Page is to just create a
static *.html page by copying the generated the html, removing everything
other than the actual tags and css, and then just playing with it in each
browser to see what effect certain changes have in the different browsers.
After you have figured out what needs changed using the static *.html file,
you can make the necessary changes in the actual Page. We may be able to
help you more if you show us some of your actual code.
 
Hello,

Thank you for your response - whoops I emailed this post on accident.

I created this web site many years ago when the framework 1.0 first came
out. Since then the site has grown very large and includes many essential
pages with custom controls. I have attempted to upgrade the project and the
upgrade utility inside Visual Studio didn't do a good job (actually, it
finished the upgrade and listed a large amount of code errors, and objects
in the designer were all out of wack). I don't have days to upgrade the web
site.

Also, I own the server and am renting public Static IP Addresses, to do
minor web hosting.

The DocType is: DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0
Transitional//EN"

NOTE:

I have only set the properties in the UI Properties Window.
There is no code behind, except storing session varables and
Response.Redirect.

TextBox style="Z-INDEX: 102; POSITION: absolute; TOP: 80px; LEFT: 24px"
id="txtNotes" runat="server" TextMode="MultiLine" Height="382px"
Width="723px" ForeColor="Black" Font-Size="10pt" Font-Names="Arial"

Thanks,

Chuck


I have a web site built in Framework 1.1.

Firstly, mainstream support for v1.1 of the Framework ended over a year ago:
http://support.microsoft.com/lifecy...t=PN&alpha=.NET+Framework+1.1&Filter=FilterNO

v2 was released in February 2006, v3.5 in November 2007 and v4 is expected
on 22 March 2010 - is there a reason that you haven't upgraded...?

I have the page set to SnapToGrid and ShowGrid and added buttons and
textboxes with specific sizes and locations for each control.

It works great in IE, however, in FireFox and Netscape

Secondly, Netscape are no longer in the browser business, and suspended all
support in March 2008:
http://browser.netscape.com/

IMO, you'd be well within your rights to tell your users that you can no
longer guarantee Netscape compatibility...

How do I work around this?

What DOCTYPE are you using...?
 
Charles A. Lackman said:
NOTE:

I have only set the properties in the UI Properties Window.
There is no code behind, except storing session varables and
Response.Redirect.

If you don't have any code in your code-behind, except for session variables
and redirects, then what could possibly not have gone well during the
upgrade attempt?
TextBox style="Z-INDEX: 102; POSITION: absolute; TOP: 80px; LEFT: 24px"
id="txtNotes" runat="server" TextMode="MultiLine" Height="382px"
Width="723px" ForeColor="Black" Font-Size="10pt" Font-Names="Arial"

Try validating the resulting client code at: http://validator.w3.org. Once
the markup validation is complete, scroll down the page and perform a CSS
validation.

But, as was stated, upgrading to 2.0 or even 3.5 would most likely help, if
not solve your problems as the Framework has become much more standards
compliant in the code that it generates since 1.1.

-Scott
 
First of all, I would suggest using the xhtml doctype:

DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"

In your textbox code, it is usually safer and more predictable to specify
things such as height, width, color, and font properties in the style
attribute rather than use control properties. I haven't seen your pages or
site, so I can't say anything for sure, except that you're probably just
digging yourself deeper by continuing to use 1.1. Also, just out of
curiosity, is it absolutely necessary that you use absolute positioning?
Even though absolute positioning does have it's place, and can be very
useful in some scenarios, it should be avoided when possible. The reason for
this is because not all browsers handle it very well, and it can be a major
headache to align things the way you want, especially if you end up changing
anything or if any of the elements are things that look different in
different browsers (such as buttons; they look different in different
browsers and browser versions, yet they are still standards compliant).
 
I have the page set to SnapToGrid and ShowGrid and added buttons and
textboxes with specific sizes and locations for each control.

It works great in IE, however, in FireFox and Netscapte the textboxes
and buttons are the wrong size (some of the labels are in the wrong
location too).

How do I work around this?

Dump Framework 1.x is my first choice. If that option is not available
....

The best way to set things up for a variety of browsers is to use CSS.
With really old browsers, like potentially NetScape (no longer supported
by anybody), you may still have rendering problems, but it should solve
FireFox, Safari, Opera, etc.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Just to add to that, using browserCaps may help:
http://slingfive.com/pages/code/browserCaps/

This is possible. The browscap methodolgy has been a pain in the rear
for quite some time, however, as it is not kept up very well. When
BrowserHawk had it (ASP days) it was kept up, but used as a loss leader
to sell their product. You can add custom browser definitions in .NET,
for newer versions, but most people don't know how to do it.

But, it is a direction to look at, so good call.

Peace and Grace,

--
Gregory A. Beamer (MVP)

Twitter: @gbworld
Blog: http://gregorybeamer.spaces.live.com

*******************************************
| Think outside the box! |
*******************************************
 
Back
Top