Solved

IIS vs Firefox for a page

Posted on 2008-10-18
3
213 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
  • 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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

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.
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …

813 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now