?
Solved

IIS vs Firefox for a page

Posted on 2008-10-18
3
Medium Priority
?
217 Views
Last Modified: 2010-08-05
This is my login page, when I view it under Firefox / Chrome the textboxes line up, but with IE6 the username field is wider than the password field. Any ideas why this would be happening?




<%@ Page Language="vb" AutoEventWireup="false" CodeBehind="login.aspx.vb" Inherits="myproject.login" %>

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

<html xmlns="http://www.w3.org/1999/xhtml" >

<head runat="server">
    <link href="css/contentpage.css" rel="stylesheet" type="text/css" />
    <title>Login</title>
</head>
<body style="background-color: Black">
    <form id="form1" runat="server">
    <div style="position:absolute; left:50%; margin-left:-146px; top:0%; margin-top:100px; width: 292px; height: 305px; border-style:solid; border-width: 0px">
        <img src="images/login.jpg" />
    </div>    
    <div style="position:absolute; left:50%; margin-left:-150px; top:0%; margin-top:450px; width: 300px; border-style:solid; border-width: 0px">
   
        <asp:Label ID="lblUsername" runat="server" Text="Username" Width="125px"></asp:Label>
        <asp:TextBox ID="tbUsername" runat="server"></asp:TextBox>
        <br />
        <asp:Label ID="lblPassword" runat="server" Text="Password" Width="125px"></asp:Label>
        <asp:TextBox ID="tbPassword" runat="server" TextMode="Password"></asp:TextBox>
        <br />
        <asp:Label ID="lblPassword0" runat="server" Width="125px" Text="Login" style="color:Black;"></asp:Label>
        <asp:Button ID="btnLogin" runat="server" Text="Login" Width="80px" />
   
        <br />
        <asp:Label ID="lblMessage" runat="server" ForeColor="Red"></asp:Label>
   
        <br />
        <br />
   
    </div>
    </form>
</body>
</html>


0
Comment
Question by:craigdev
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 44

Expert Comment

by:scrathcyboy
ID: 22749605
You haven't said how much wider.  If only a small amount, use CSS to limit the form and input field margins

FORM  { margin:0px; padding:0px }
INPUT  { margin:0px; padding:0px }

If a lot more, it will be to do with your DIV layout.  
0
 
LVL 1

Author Comment

by:craigdev
ID: 22749907
it's about 20px - what is wrong with my div layout?
0
 
LVL 44

Accepted Solution

by:
scrathcyboy earned 2000 total points
ID: 22749973
nothing is necessarily "wrong" with it.  It is not a matter of right and wrong, it is a matter of the fact that some browsers will take more space for an input field if the space is there.  You have 2 input boxes of 125 wide in a DIv of 300px wide, so IE6 and other browsers will take more room if they have it.  First you need to try the form and input styling above.  Then you should set a max width to the input fields, and if steps 1 and 2 don't fix the problem, then narrow the DIV and put display:inline in its CSS styling.
0

Featured Post

WordPress Tutorial 3: Plugins, Themes, and Widgets

The three most common changes you will make to your website involve the look (themes), the functionality (plugins), and modular elements (widgets).

In this article we will briefly define each again, and give you directions on how to install them.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Find out what you should include to make the best professional email signature for your organization.
In this tutorial viewers will learn how add a scalable full-width header using CSS3. Create a new HTML document with an internal stylesheet. Set a tiled background.:  Create a new div and name it Header. Position it with position:absolute at the top…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Suggested Courses

752 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question