Solved

IIS vs Firefox for a page

Posted on 2008-10-18
3
216 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 500 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

Don't Cry: How Liquid Web is Ensuring Security

WannaCry is just the start. Read how Liquid Web is protecting itself and its customers against new threats.

Question has a verified solution.

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

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
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…
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…

705 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