
body {
background-color:#F7F7F7;
}
fieldset {
border:1px dashed #CCC;
padding:10px;
}
legend {
font-family:Arial, Helvetica, sans-serif;
font-size: 90%;
letter-spacing: -1px;
font-weight: bold;
line-height: 1.1;
color:#fff;
background: #666;
border: 1px solid #333;
padding: 2px 6px;
}
h1 {
font-family:Arial, Helvetica, sans-serif;
font-size: 175%;
letter-spacing: -1px;
font-weight: normal;
line-height: 1.1;
color:#333;
}
label {
width:142px;
height:32px;
margin-top:3px;
margin-right:2px;
padding-top:11px;
padding-left:6px;
background-color:#CCCCCC;
float:left;
display: block;
font-family:Arial, Helvetica, sans-serif;
font-size: 115%;
letter-spacing: -1px;
font-weight: normal;
line-height: 1.1;
color:#666;
}
.form {
margin:0;
padding:0;
}
#container {
width:750px;
margin:auto;
padding:10px;
}
#top {
width:680px;
height:50px;
}
#leftSide {
width:530px;
padding-top:30px;
float:left;
}
#rightSide {
background-color:#fff;
width:200px;
padding:5px;
margin-top:40px;
float:right;
border:1px solid #CCC;
font:normal 12px Arial;
color:#666666
}
.clear {
clear:both;
}
.holder {
background-color:#fff;
}
.div_texbox {
width:347px;
float:right;
background-color:#E6E6E6;
height:35px;
margin-top:3px;
padding-top:5px;
padding-bottom:3px;
padding-left:5px;
}
.textbox {
background-image: url(images/16t.png);
background-repeat: no-repeat;
background-position:left;
width:285px;
font:normal 18px Arial;
color: #999999;
padding:3px 5px 3px 19px;
}
.textbox:focus, .textbox:hover {
background-color:#F0FFE6;
}
.username {
background-image: url(images/16m.png);
background-repeat: no-repeat;
background-position:left;
width:285px;
font:normal 18px Arial;
color: #999999;
padding:3px 5px 3px 19px;
}
.username:focus, .username:hover {
background-color:#F0FFE6;
}
.password {
background-image: url(images/16s.png);
background-repeat: no-repeat;
background-position:left;
width:285px;
font:normal 18px Arial;
color: #999999;
padding:3px 5px 3px 19px;
}
.password:focus, .password:hover {
background-color:#F0FFE6;
}
.button_div {
width:287px;
float:right;
background-color:#fff;
border:1px solid #ccc;
text-align:right;
height:35px;
margin-top:3px;
padding:5px 32px 3px;
}
.buttons {
background: #e3e3db;
font-size:12px;
color: #989070;
padding: 6px 14px;
border-width: 2px;
border-style: solid;
border-color: #fff #d8d8d0 #d8d8d0 #fff;
text-decoration: none;
text-transform:uppercase;
font-weight:bold;
}
We have created the styles so what we need now would be the form that will collect our data. Here it is...
<div id="container">
<div id="top">
<h1>Please complete the form below</h1>
</div>
<div id="leftSide">
<fieldset>
<legend>Login details</legend>
<form action="login.php" method="POST" class="form">
<label for="username">Username</label>
<div class="div_texbox">
<input name="username" type="text" class="username" id="username" value="username" />
</div>
<label for="password">Password</label>
<div class="div_texbox">
<input name="password" type="password" class="password" id="password" value="password" />
</div>
<div class="buuton_div">
<input name="Submit" type="button" value="Submit" class="buttons" />
</div>
</form>
</fieldset>
<br /><hr size="1"><br />
<fieldset>
<legend>Personal details</legend>
<form action="pay.php" method="POST" class="form">
<label for="name">Name</label>
<div class="div_texbox">
<input name="name" type="text" class="textbox" id="name" value="John Doe" />
</div>
<label for="address">Address</label>
<div class="div_texbox">
<input name="address" type="text" class="textbox" id="address" value="12 main" />
</div>
<label for="city">City</label>
<div class="div_texbox">
<input name="city" type="text" class="textbox" id="city" value="Rochester" />
</div>
<label for="country">Country</label>
<div class="div_texbox">
<input name="country" type="text" class="textbox" id="country" value="United States" />
</div>
<div class="button_div">
<input name="Submit" type="button" value="Submit" class="buttons" />
</div>
</form>
</fieldset>
</div>
<div id="rightSide">
<p><u>This is the right side div that can be used for showing info's in order to help the visitor.</u> Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
</p></div>
<div class="clear"></div>
</div>
Notice that we used a class named "clear". It will help us to clear the floats otherwise our floating elements will break the layout and the container will not go around to close them.
I can't say that the methods I've used are the best ones but I can, at least, hope that they will be a good starting point/example for you to understand some basic elements used in our examples below. Why margin and no padding, why floating etc. I also suggest Macromedia Dreamweaver 8 which, different from the previous one (Dreamweaver Mx 2004) has more support for DIV's, layers and other elements making them more visible and easier to select when you're in design mode. The padding is also visible. It's so easy to understand using this program. You can download a free trial on the Adobe website.
This is a basic layout, you can use your imagination and change it to suit your needs and taste. Here's an output for example1 and for example2.
Download links lower on the page.
Thank you for reading this,
Mihalcea Romeo
Update:
Works on Safari 1.2 and 1.3 now, Firefox 1+, 2+, IE 6+, Opera 8.0. 9.0, Konqueror.
Update2:
I received goods and bads for this posting. I thank you all. All comments will be available. If you have a tableless form that you wish to submit please contact me at manilodisan [at] gmail.com and I will upload them here (don't forget to leave a link inside or contact form).
No. |
Attachments |
Downloads |
|
|
1 |
Example 2 Example 2 files. Uploaded on: 2007-09-21 | 01:16 am |
3069 |
|
|
2 |
Example 1 Example 1 files. Uploaded on: 2007-09-21 | 01:15 am |
3910 |
|
Added by roScripts on April-18-2007, 3:53 pm
