Solved

IIS vs Firefox for a page

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

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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 embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

744 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

9 Experts available now in Live!

Get 1:1 Help Now