473,421 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,421 software developers and data experts.

<center> and Style Position:Absolute with changing window Size?

I have a simple login page with roughly a 300px x 300px image behind
the asp.net login control. I need the login control to land in the
middle of the image. I want both the image and the login controlrol to
always be in the center of the page. How can I do this?

I use position:absolute to get the asp.net login control on top of
the image, but then when the IE window size is changed (by the user)
the login control does not center. Here's my markup code:

<form id="form1"
runat="server">
<br /
>
<center>
<div>
<img src="App_Themes/Retailer/images/
retaillogin.GIF" />

<asp:Login ID="Login" runat="server"
DestinationPageUrl="~/Main/Default.aspx"
Style="position: absolute; left: 278px; top:
188px" Height="152px" Width="327px">
</
asp:Login>
<asp:Button ID="RecoverPassword" runat="server"
Text="Recover Password"

PostBackUrl="RecoverPass.aspx" Style="left: 286px; position:
absolute; top: 319px"
Width="100px" /
>
</
div>
</
center>
</form>

Aug 15 '07 #1
1 5144
On Aug 15, 11:36 pm, jobs <j...@webdos.comwrote:
I have a simple login page with roughly a 300px x 300px image behind
the asp.net login control. I need the login control to land in the
middle of the image. I want both the image and the login controlrol to
always be in the center of the page. How can I do this?

I use position:absolute to get the asp.net login control on top of
the image, but then when the IE window size is changed (by the user)
the login control does not center. Here's my markup code:

<form id="form1"
runat="server">
<br /

<center>

<div>
<img src="App_Themes/Retailer/images/
retaillogin.GIF" />

<asp:Login ID="Login" runat="server"
DestinationPageUrl="~/Main/Default.aspx"
Style="position: absolute; left: 278px; top:
188px" Height="152px" Width="327px">
</
asp:Login>
<asp:Button ID="RecoverPassword" runat="server"
Text="Recover Password"

PostBackUrl="RecoverPass.aspx" Style="left: 286px; position:
absolute; top: 319px"
Width="100px" /

</
div>
</
center>
</form>

Hi!

Here is a site on centering divs which might be helpful
http://locusmeus.com/html-css/centeringpage.html

Picked it up from this thread
http://www.thescripts.com/forum/thread100767.html

Aug 16 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Catherine Lynn Smith | last post by:
I am creating a webpage with dhtml <DIV> layers and I want a link on one layer to modify the content on another but I seem to keep running into errors. Basically I create a layer in the middle...
1
by: News | last post by:
Hi All, I'm trying to center a StyleSheet like below : <div id="CenterThis" style="position:absolute; top:40px; left:70px;">This should be centered</div> With this code : <script...
9
by: Julia Briggs | last post by:
How do I construct a <iframe> or equivalent for FireFox/NS browsers, inside a screen centered <div> tag? Can it be done?
4
by: dropdeadster | last post by:
Trying to line up a tic-tac-toe board type grid of images using style= tags to <img inside a table TD but it's not working, I get more like a set of steps, can I get an explanation of what's wrong...
4
by: Winston | last post by:
Where is the mistake? I want to make a simple menu. These are two pieces of two files... function ShowMenu(objeto) { is_open = document.getElementById(objeto).style.display;...
1
by: Carl | last post by:
Hi all I have a javascript function that drags and drops an element (ie img) into a container (ie bordered div). The function works and returns the element and and container. My next step is to...
2
by: markszlazak | last post by:
I'm a relatively slow response of table cells changing their background color with mouseover/our in IE6 (Win 2K) but the response is fine (fast) in Firefox. Why? The code is below. Sorry about the...
5
Plater
by: Plater | last post by:
To accomplish what I am looking for (the image centered in it's parent top 'centered') I have done this: <div id="backing"> <div id="lbImgBacker"> <center> <img id="Image1"...
4
by: justice750 | last post by:
Hi All, I am using a FormView control. The allows me to update records in the database. However, when a database field is null I can not update the field on the form. It works fine when the field...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.