473,748 Members | 5,429 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

<center> and Style Position:Absolu te 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:absolu te 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"
DestinationPage Url="~/Main/Default.aspx"
Style="position : absolute; left: 278px; top:
188px" Height="152px" Width="327px">
</
asp:Login>
<asp:Button ID="RecoverPass word" runat="server"
Text="Recover Password"

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

Aug 15 '07 #1
1 5172
On Aug 15, 11:36 pm, jobs <j...@webdos.co mwrote:
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:absolu te 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"
DestinationPage Url="~/Main/Default.aspx"
Style="position : absolute; left: 278px; top:
188px" Height="152px" Width="327px">
</
asp:Login>
<asp:Button ID="RecoverPass word" runat="server"
Text="Recover Password"

PostBackUrl="Re coverPass.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
9841
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 of the screen that initially comes up with a gif image of a house: <!-- start "house" layer definition for center of screen --> <DIV id="house" style="position:absolute; left:140px; top:137px; width:510px; height:325px; z-index:2"><img...
1
11251
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 language="JavaScript" type="text/javascript">
9
3146
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
4066
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 with this and how to do it correctly?: <table border="1"> <tr> <td valign="top" align="left">
4
2182
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; document.getElementById("menu_p").style.display='none'; if (is_open == 'none') { document.getElementById(objeto).style.display='block'; }
1
4621
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 center the element in the container if the user is sloppy with positioning it. I can only test this on IE6 and IE5.5 and it fails. It positions the element too much right and low. Here is the function: function SnapToContainer(Container,El) {
2
3031
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 length. <html> <head> <title>Rapid Blocking Interface</title> <style> .calendar {
5
4687
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" src="banner.JPG" alt="" style="border-width:0px;" /> </center> </div> <div id="ExampleLeftAlignElement" ></div> <!-- other elements and the rest of the page -->
4
2905
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 is not a null value. I am not using any code behind (C#) to bind the data or manipulate the data. I have read that when there is a null value in the database that there is no record in the "dataset". Can anyone show me how to bind a value in the...
0
8826
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9366
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9241
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8239
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6793
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4597
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4867
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2777
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2211
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.