Click to See Complete Forum and Search --> : how to make the web page open correctly across all the browsers


rahulvasanth
February 24th, 2006, 12:44 AM
Hi

I have developed a web using ASP.NET. The web pages work well in IE 6.0. But when I open the same web page in FireFox 1.5 or Netscape 8.0, I notice some differences. The major difference is in the dropdownlist control.
If the dropdownlist value is emty, then the height of the deopdownlist control is very very less in firefox and netscape, but it opens properly in IE.

I tried setting the height of the dropdownlist, but its now working.

Can anyone suggest how to make the web page comaptible with all the browsers ?

Thanking in advance

JetDeveloper
February 24th, 2006, 02:49 PM
You can dynamically add attributes in Page_Load and then it should apply the styles to Firefox and Netscape.


private void Page_Load(object sender, System.EventArgs e)
{
// Add a style attribute to the drop down
myDropDown.Attributes.Add("style","width: 200; font-family: Verdana; font-size: 10pt; color: #0000ff; background-color: #8888ff");

if (!IsPostBack)
{

// Initialize data here
}

}

rahulvasanth
February 27th, 2006, 01:17 AM
Thanks for the reply

I used the following in ASP.NET

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

It seems to be working fine for different browsers.