views:

75

answers:

4

How do i make my vb.net application (running on intranet) compatible with all the browsers. The problem is all the text boxes and drop downs size varies when I browse the application in different browsers. For example when I browse in Chrome all the drop downs size changes and textbox becomes small.In IE8 all the dropdowns , comboboxes and the size of the grids gets changed. The combobox in firefox and IE 7 or later gets small in size.Is there any solution for this.

And also I would like to add , the application works perfectly with IE6 only.

A: 

check this page..their project tripoli should be useful for setting basic standards in styling...

ZX12R
+3  A: 

You can include a css reset stylesheet in your html like this one from YAHOO:

http://developer.yahoo.com/yui/3/cssreset/

then apply sensible defaults like CSS Base:

http://developer.yahoo.com/yui/3/cssbase/

and then build on top of that.

Unfortunately, this is the tricky part of web development since you need tweaks and tricks for most browsers you choose to support.

You can use a conditional include for an ie6 only stylesheet since this will need the most tweaks like so:

<link rel="stylesheet" href="style.css" type="text/css" media="screen">    
<!--[if IE6]>  
    <link rel="stylesheet" href="style-ie6.css" type="text/css" media="screen">
<![endif]--> 

You would then put in specific changes for ie6, overriding styles in your main stylesheet.

For javascript, I would recommend using a library like jQuery or YUI since the functions in these libraries deal with all the browser specific issues for you.

Neal Donnan
A: 

1) test on all browsers through the development cycle

2) Use jQuery or other javascript libraries that cater for all browsers

Mark Redman
+1  A: 

I use a CSS reset file to acheive the best base platform that I can get. From there it is writing standards compliant code, if you follow that you will be pretty good in the end. You will always have some things to fix for IE, so conditional style sheets is a good way to fix those.

I use YUI reset and base CSS files.

Using this practice I have numerous site that have gone through many version upgrades across all browsers and maintained complete compatibility including IE6.

Dustin Laine