nathj 938
Recognized Expert Contributor
Hi,
I'm surrently struggling with something I'm certain should be very simple. I'm working on a new web application that requires every user to login before they do anything else. This means that the first page is a login page.
I have produced simple graphic for the login form and I want the controls to sit within this. Unfortunately this is all just local only at the moment and so I can show you the results.
The code is as follows: LoginPage_layou t.css -
/* General Document Format */
-
html, body, ul, ol, li, p, blockquote, q,
-
h1, h2, h3, h4, h5, h6, fieldset, legend,
-
form, label, a, div, img, dd, dt, dl, input, span, img
-
{
-
margin : 0px;
-
padding : 0px;
-
border : 0px;
-
}
-
-
body
-
{
-
font-family : verdana, "trebuchet MS", helvetica, sans-serif;
-
font-size : 11px;
-
line-height : 1.637;
-
margin : 0px 0px;
-
padding : 0px;
-
height : 100%;
-
text-align : center ;
-
}
-
-
/* Containers */
-
div.loginContainer
-
{
-
width : 315px ;
-
height : 212px ;
-
margin-left : auto ;
-
margin-right : auto ;
-
margin-top : 194px ;
-
margin-bottom : 194px ;
-
background-image : url("../image/LoginFormBackground.png") ;
-
background-repeat : no-repeat ;
-
border : solid 2px #602103;
-
}
-
-
div.loginContainer img
-
{
-
display : inline ;
-
}
-
-
form.loginForm
-
{
-
width : 315px ;
-
height : 212px ;
-
margin-left : auto ;
-
margin-right : auto ;
-
margin-top : 194px ;
-
margin-bottom : 194px ;
-
border : solid 2px #FF0000;
-
}
-
-
div.username
-
{
-
position : relative ;
-
display : inline ;
-
left : 2px ;
-
width : 230px ;
-
top : 1px ;
-
height : 26px ;
-
border : solid 2px #FFFF00;
-
}
-
-
div.password
-
{
-
position : relative ;
-
display : inline ;
-
left : 2px ;
-
width : 230px ;
-
top : 28px ;
-
height : 26px ;
-
border : solid 2px #0000FF;
-
}
-
-
div.loginButton
-
{
-
position : relative ;
-
left : 112px ;
-
width : 100px ;
-
top : 185px ;
-
height : 28px ;
-
border : solid 2px #00FF00;
-
}
-
-
ResponseTracker _colour.css -
body
-
{
-
background : #eeeafe ;
-
}
-
-
/* Containers */
-
div.loginContainer
-
{
-
background : #eeeafe ;
-
}
-
-
The borders in the first css file are there only for testing and development - they enable me to see where everything is properly. Login.html [html]
<head>
<link rel="stylesheet " type="text/css" href="style/responsetracker _colour.css" />
<link rel="stylesheet " type="text/css" href="style/loginpage_layou t.css" />
</head>
<body>
<div class="loginCon tainer">
<form class="loginFor m" name="frm_Login " method="post" action="mainpag e.php">
<div class="username ">
Username: <input type="text" id="username" title="Please enter your ResponseTracker username" />
</div>
<div class="password ">
Password: <input type="password" id="access" title="Please enter your ResponseTracker password" />
</div>
<div class="loginBut ton">
<input name="login" type="image" src="image/loginButton.png " alt="Login" title="Click to login" onmouseover="th is.style.cursor ='pointer'" onclick="frm_Lo gin.submit()"/>
</div>
</form>
</div>
</body>
[/html]
I'm pretty new to CSS and still learning so I'm certain there is an easy way to achieve this. What I want is for the input controls and the button image to be on top of the picture.
Thanks in advance
nathj
1 2834 nathj 938
Recognized Expert Contributor
Hi,
Since making my original post I have solved the problem - I was right, it was a bit of stupidity on my part. Anyway the problem has been solved and here is the new code. loginPage_layou t.css -
-
/* General Document Format */
-
html, body, ul, ol, li, p, blockquote, q,
-
h1, h2, h3, h4, h5, h6, fieldset, legend,
-
form, label, a, div, img, dd, dt, dl, input, span, img
-
{
-
margin : 0px;
-
padding : 0px;
-
border : 0px;
-
}
-
-
body
-
{
-
font-family : verdana, "trebuchet MS", helvetica, sans-serif;
-
font-size : 11px;
-
line-height : 1.637;
-
margin : 0px 0px;
-
padding : 0px;
-
height : 100%;
-
text-align : center ;
-
}
-
-
/* Containers */
-
div.loginContainer
-
{
-
width : 315px ;
-
height : 212px ;
-
margin-left : auto ;
-
margin-right : auto ;
-
margin-top : 194px ;
-
margin-bottom : 194px ;
-
background-image : url("../image/LoginFormBackground.png") ;
-
background-repeat : no-repeat ;
-
}
-
-
div.username
-
{
-
position : relative ;
-
left : 15px ;
-
width : 230px ;
-
top : 70px ;
-
height : 26px ;
-
}
-
-
div.password
-
{
-
position : relative ;
-
left : 15px ;
-
width : 230px ;
-
top : 80px ;
-
height : 26px ;
-
}
-
-
div.loginButton
-
{
-
position : relative ;
-
left : 200px ;
-
width : 100px ;
-
top : 120px ;
-
height : 28px ;
-
}
-
-
/* Form Layout and Presentation */
-
-
input.textBased
-
{
-
border : solid 1px #808080 ;
-
height : 18px ;
-
width : 150px ;
-
margin-left : 2px ;
-
}
-
ie_layout.css -
div.loginButton
-
{
-
left : 100px ;
-
}
-
And the HTML is: loginPage.html [html]
<head>
<!-- no meta tags as this is not intended to be found by a serch system -->
<link rel="stylesheet " type="text/css" href="style/responsetracker _colour.css" />
<link rel="stylesheet " type="text/css" href="style/loginpage_layou t.css" />
<!--[if IE]>
<link rel="stylesheet " type="text/css" href="style/ie_layout.css"/>
<![endif]-->
</head>
<body>
<div class="loginCon tainer">
<form name="frm_Login " method="post" action="mainpag e.php">
<div class="username ">
Username: <input class="textBase d" type="text" id="username" title="Please enter your ResponseTracker username" />
</div>
<div class="password ">
Passwo rd: <input class="textBase d" type="password" id="access" title="Please enter your ResponseTracker password" />
</div>
<div class="loginBut ton">
<input name="login" type="image" src="image/loginButton.png " alt="Login" title="Click to login" onmouseover="th is.style.cursor ='pointer'" onclick="frm_Lo gin.submit()"/>
</div>
</form>
</div>
</body>
[/html]
This results in the form being positioned on top of the image giving a much nicer look to the initial login page.
Many thanks
nathj
PS If you have a better way of doing this then please let me know
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Bettina |
last post by:
I have a text field and I want that after I enter a text in this text
field, the focus goes to the button.gif. How can I do it? Any ideas?
I know that when you use an input type="submit", the focus goes
automatically to the button, but I don't want to use a button.
See please the piece of code:
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
|
by: Dickyb |
last post by:
Extracting an Icon and Placing It On The Desktop (C# Language)
I constructed a suite of programs in C++ several years ago that handle my
financial portfolio, and now I have converted them to C#. The only
significant problem that I have encountered in the conversion is this one -
extracting an icon from the 'KTEntryPoint' program into the software suite
and placing that icon on the PC Desktop.
|
by: objectref |
last post by:
Hi to all folks,
i have the following problem and i have spent many hours to solve it
but without any result, so, here it is:
Imagine that you have a mdi-child form that has a panel on it, a panel that
it's
height has the value of 3000. The panel also has a vertical scrollbar so i
can
|
by: dwa |
last post by:
This is a bit off-topic, but...
Is it possible to write client side script that can address INPUT controls
with a type of "image" which will work under Netscape/Mozilla?
<INPUT type="image" ...>
Controls of this type are excluded from the forms.elements collection and
'document.all' isn't supported my Mozilla browsers?
|
by: Nathan Sokalski |
last post by:
When I view any page in my application a second time, I recieve the
following error:
System.Web.TraceContext.AddNewControl(String id, String parentId, String
type, Int32 viewStateSize) +313
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +201
System.Web.UI.Control.BuildProfileTree(String parentId, Boolean
calcViewState) +263
| |
by: Alan Silver |
last post by:
Hello,
I have a page which I am converting to use themes. The page has an HTML
<input type="image"> element that is used to post to another page. I
would like to replace this with a server control so I can add a skinid.
I tried adding runat="server" and the skinid to the existing control,
but that didn't work. Any other ideas? TIA
--
|
by: jon |
last post by:
Hi
This might be an easy one to answer but I have a web form in an ASP.NET
1.1 application with a hand-rolled HTML image button as follows which
opens a help guide in a new window:
<input type= "image " id= " imgHelp "
onclick="javascript:void(window.open('<%
Response.Write(ConfigurationSettings.AppSettings); %>')) ">
|
by: jackiepatti |
last post by:
QUESTION:
I have a web page containing a form that contains an image instead of a
submit button, e.g.
<form name='myform' action='get' method='otherpage.asp'>
<input type='image' src='picture.gif' name='myimage' id='myimage'>
</form>
When forms with image types are submitted, the value is not returned;
instead, when the form is submitted, the XY coordinates of the where
the user clicked on the image are sent. For example, if the user
|
by: Valli |
last post by:
Hi,
I want to add an image to a html type input button. How can I do this?
I have used background image style . But its not working.
My target is to show an image in the button
can anyone help me?
--
Regards
|
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,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
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...
|
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...
|
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...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert into image.
Globals.ThisAddIn.Application.ActiveDocument.Select();...
|
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...
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |
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...
| |