<!DOCTYPE html>
<html>
<head>
<title>PSD to HTML</title>
<link rel="stylesheet" href="css/style.css" type="text/css" />
</head>
<body>
<!-- This is our main center content box -->
<div id="container">
<!-- Begin Header -->
<div style="clear:both" id="header">
<img style="float:left" id="main-logo" src="images/logo.png">
<span id="search-field-wrapper">
<input size="40" type="text" id="search" name="search" placeholder="Search Tutorials"/>
<img id="btn-search" src="images/btn-search.png" style="vertical-align: middle;"> </span>
<span id="login-wrapper">
<input type="text" id="username" name="username" placeholder="Username"/>
<input type="text" id="password" name="password" placeholder="Password"/>
<a href="#">Forgot Password</a>
</span>
<!-- This is the LOGIN button, although it says search, just haven't got
around to slicing it from PSD yet -->
<span>
<img id="btn-login" src="images/btn-search.png" style="vertical-align: middle;">
</span>
</div>
<div style="clear:both"></div>
<div style="clear:both"></div>
<!-- End Header -->
</div>
</body>
</html>
/**
TABLE OF CONTENTS
[1] SITEWIDE - General styles that apply to entire document
[2] HEADING - Site name, logo, search field, login username/password
***/
/***********************************************************
* [1] SITEWIDE
***********************************************************/
body {
background: #333 url('../images/body-rpt.jpg') repeat-x;
color: #CCCCCC;
}
/* Links light so we can see them */
a {
color:#FFFFFF;
}
/* Main Centered DIV. I have added a border
just so I can see it while designing */
#container {
margin-top: 20px;
width: 945px;
margin-right: auto;
margin-left: auto;
text-align: left;
border: 1px solid #FFFFFF;
}
/* Round the corners of the input boxes */
#header input[type=text]
{
-moz-border-radius: 6px;
border-radius: 6px;
border:solid 1px black;
padding:5px;
height: 12px;
}
/* Add some space between the search button
and the search textfield */
#btn-search {
margin-left: 10px;
}
/* !!!!!!!!!! POSSIBLE HELP NEEDED HERE ???? !!!!!!!!!!!
*
* I needed to preciselt position this text field, so I
* chose to use ABSOLUTE positioning. NOT SURE if this is
* the correct way.
*/
#search-field-wrapper{
position: absolute;
left: 397px;
top: 31px;
}
/* !!!!!!!!!! POSSIBLE HELP NEEDED HERE ???? !!!!!!!!!!!
*
* As above, I neded to position these text fields in
* a precise spot. I don't know if this is the best way???
*/
#login-wrapper{
position: absolute;
float: right;
left: 752px;
top: 7px;
}
ASKER
understanding the solution would be a bonus!That's what I was trying to do.
HTML (HyperText Markup Language) is the main markup language for creating web pages and other information to be displayed in a web browser, providing both the structure and content for what is sent from a web server through the use of tags. The current implementation of the HTML specification is HTML5.
TRUSTED BY
Here's a Photoshop screen capture showing your design with 15 slices drawn in.
Open in new window