CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2004
    Posts
    265

    Unhappy how to make the web page open correctly across all the browsers

    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

  2. #2
    Join Date
    Aug 2004
    Location
    Land of sunshine and June Gloom
    Posts
    171

    Re: how to make the web page open correctly across all the browsers

    You can dynamically add attributes in Page_Load and then it should apply the styles to Firefox and Netscape.

    PHP Code:
    private void Page_Load(object senderSystem.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    
        
    }
                    

    Last edited by JetDeveloper; February 24th, 2006 at 03:51 PM.

  3. #3
    Join Date
    Sep 2004
    Posts
    265

    Re: how to make the web page open correctly across all the browsers

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured