cc4digital
04-27-2011, 09:13 PM
I am new to web design and I have been working on this issue for a while. I tried putting my form in a table, using blocks with absolute, and I just can not get thing to align.
Any suggestion or help would be much appreciated--:thumbsup:
Here is what I currently have:
http://charlescoughlin.com/cssissue/current.jpg
Here is what I want or something close--See alignment of time next to date:
http://charlescoughlin.com/cssissue/wanted.jpg
Here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
background-color:white;
}
#wrapper {
width: 650px;
background-color:#b49a66;
margin: 20px auto;
border:#394891 solid;
border-width:5px;
}
fieldset{
margin:10px;
padding:10px;
border:1px solid #09c0d4;
margin-bottom:15px;
width: 650px;
}
legend{
padding:10px;/*gives a bit of padding between the border and the test*/
color:#EEBA6A;
font-weight:800;
font-size: 1.2em;
}
/*label.blocklabel {display: block; position: relative; margin: 12px 0px;}
label.blocklabel input {position: absolute; left: 300px;}
#smonth {position: absolute; left: 150px;}
#sday {position: absolute; left: 250px;}
*/
</style>
</head>
<body>
<form action="" >
<fieldset>
<legend>Appointment Setup:</legend>
<label class="blocklabel">Start Date:
<select id="smonth" name="smonth">
<option value="">Month</option>
<option value="1">January</option>
<option value="2">Feburary</option>
</select>
<select id="sday" name="sday">
<option value="">Day</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</select><input type="text" name="syear" id="year" maxlength="4" size="4" />
</label>
<label class="blocklabel"> Start Time:
<input type="text" name="shour" maxlength="2" size="2" />
<input type="text" name="smin" maxlength="2" size="2" />
<select name="smer">
<option value="AM">AM </option>
<option value="PM">PM </option>
</select>
</label>
<p></p>
<label class="blocklabel">End Date:
<select name="emonth">
<option value="">Month</option>
<option value="1">January</option>
<option value="2">Feburary</option>
</select>
<select name="eday">
<option value="">Day</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</select><input type="text" name="eyear" id="year" maxlength="4" size="4" />
</label>
<label class="blocklabel"> End Time:</span>
<input text="text" name="ehour" maxlength="2" size="2" />
<input text="text" name="emin" maxlength="2" size="2" />
<select name="emer">
<option value="AM">AM </option>
<option value="PM">PM </option>
</select>
</label>
<p> </p>
<label class="blocklabel">Time Interval
<input type="text" name="interval" size="2" maxlength="2" />
</label>
</body>
</html>
Any suggestion or help would be much appreciated--:thumbsup:
Here is what I currently have:
http://charlescoughlin.com/cssissue/current.jpg
Here is what I want or something close--See alignment of time next to date:
http://charlescoughlin.com/cssissue/wanted.jpg
Here is my code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
body {
background-color:white;
}
#wrapper {
width: 650px;
background-color:#b49a66;
margin: 20px auto;
border:#394891 solid;
border-width:5px;
}
fieldset{
margin:10px;
padding:10px;
border:1px solid #09c0d4;
margin-bottom:15px;
width: 650px;
}
legend{
padding:10px;/*gives a bit of padding between the border and the test*/
color:#EEBA6A;
font-weight:800;
font-size: 1.2em;
}
/*label.blocklabel {display: block; position: relative; margin: 12px 0px;}
label.blocklabel input {position: absolute; left: 300px;}
#smonth {position: absolute; left: 150px;}
#sday {position: absolute; left: 250px;}
*/
</style>
</head>
<body>
<form action="" >
<fieldset>
<legend>Appointment Setup:</legend>
<label class="blocklabel">Start Date:
<select id="smonth" name="smonth">
<option value="">Month</option>
<option value="1">January</option>
<option value="2">Feburary</option>
</select>
<select id="sday" name="sday">
<option value="">Day</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</select><input type="text" name="syear" id="year" maxlength="4" size="4" />
</label>
<label class="blocklabel"> Start Time:
<input type="text" name="shour" maxlength="2" size="2" />
<input type="text" name="smin" maxlength="2" size="2" />
<select name="smer">
<option value="AM">AM </option>
<option value="PM">PM </option>
</select>
</label>
<p></p>
<label class="blocklabel">End Date:
<select name="emonth">
<option value="">Month</option>
<option value="1">January</option>
<option value="2">Feburary</option>
</select>
<select name="eday">
<option value="">Day</option>
<option value="1">1</option>
<option value="2">2</option>
</select>
</select><input type="text" name="eyear" id="year" maxlength="4" size="4" />
</label>
<label class="blocklabel"> End Time:</span>
<input text="text" name="ehour" maxlength="2" size="2" />
<input text="text" name="emin" maxlength="2" size="2" />
<select name="emer">
<option value="AM">AM </option>
<option value="PM">PM </option>
</select>
</label>
<p> </p>
<label class="blocklabel">Time Interval
<input type="text" name="interval" size="2" maxlength="2" />
</label>
</body>
</html>