Simple sliding login page..

<!–

used: jquery,css 2,html 4.01

This is a source code for sliding login page.It is not that kind of good as it has to be. I do it i have seen this kind of sliding login system in a web site.So whatever it is.. i will try to  update it next time.

When you click on “open login panel” it will slide down the log in panel and after click on the “close panel” it slideUp the panel ..

–>

<!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”&gt;
<html xmlns=”http://www.w3.org/1999/xhtml”&gt;
<head>
<meta http-equiv=”Content-Type” content=”text/html; charset=utf-8″ />
<title>Untitled Document</title>
<script type=”text/javascript” src=”jquery.js”></script>
<script type=”text/javascript”>
$(document).ready(function(){

$(‘#but1’).click(function(){

var val = $(this).val();
if(val == ‘Open Login Panel’){
$(this).val(‘Close Panel’)
$(‘#login’).slideDown();

}
else
{
$(‘#but1’).val(‘Open Login Panel’);
$(‘#login’).slideUp();
}

});

});
</script>
<style type=”text/css”>
#main
{
background-color: #FCF;
height:1000px;
width:960px;
margin:0 auto;
}
#header
{
height:100px;
background-color:#CFF;
}
#header h1
{
position:relative;
top:25%;
left:35%;
width:300px;
}
#login
{
height:200px;
margin:0 auto;
padding:0px;
width:960px;
margin-top:0px;
background-color:#CCF;
display:none;
}
#login_div
{
width:200px;
}
#but_div
{
width:960px;
height:auto;
margin:0 auto;
background-color: #CCF;
border-radius:0px 0px 0px 15px;
-moz-border-radius:0px 0px 0px 15px;
text-align:right;
}
#but1
{
border-radius:0px 0px 0px 15px;
-moz-border-radius:0px 0px 0px 15px;
background-color: #699;
font-size:18px;

}
hr
{
height:4px;
}
</style>
</head>

<body>
<div id=”login”>
<h3 align=”center”><font size=”20px”>Please Login</font></h3>
<hr />
<span id=”login_div”>

<table width=”200″ border=”0″ align=”center”>
<form id=”form1″ name=”form1″ method=”post” action=””>

<tr>
<th width=”63″ align=”center” valign=”middle”>User Id</th>
<th width=”8″ align=”center” valign=”middle”>:</th>
<td width=”107″><input type=”text” name=”textfield” id=”textfield” /></td>
</tr>
<tr>
<th align=”center” valign=”middle”>Password</th>
<th align=”center” valign=”middle”>:</th>
<td><input type=”password” name=”textfield2″ id=”textfield2″ /></td>
</tr>
<tr>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td align=”center” valign=”middle”><input type=”submit” name=”button” id=”button” value=”Login” /></td>
</tr>
</form>
</table>
</span>
</div>
<div id=”but_div”>
<input type=”button” value=”Open Login Panel” id=”but1″/>
</div>
<div id=”main”>
<div id=”header”><h1>This is a header</h1></div>
</div>
</body>
</html>

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s