panJames
asked on
CSS, web page formatting
Hello experts!
Please have a look at this code:
HTML
<form method="post" action="">
<fieldset>
<ol>
<li class="email">
<label for="email" >Email:</label>
<input type="text" align="left" id="email" name="email" title="Email address"/>
</li>
CSS
fieldset {
margin: 1em 0;
padding: 1em;
border: 1px solid #CCC;
}
fieldset label {
float:left;
display: block;
}
fieldset input[type="text"], input[type="password"] {
border: 1px solid #ccc;
padding: 2px;
font-size: 1.2em;
color: #444;
width: 300px;
float:left;
}
What I want to achieve is to position my label and input field in one row, next to each other, nicely positioned with proper horizontal distances.
How can I do it?
Thank you!
panJames
Please have a look at this code:
HTML
<form method="post" action="">
<fieldset>
<ol>
<li class="email">
<label for="email" >Email:</label>
<input type="text" align="left" id="email" name="email" title="Email address"/>
</li>
CSS
fieldset {
margin: 1em 0;
padding: 1em;
border: 1px solid #CCC;
}
fieldset label {
float:left;
display: block;
}
fieldset input[type="text"], input[type="password"] {
border: 1px solid #ccc;
padding: 2px;
font-size: 1.2em;
color: #444;
width: 300px;
float:left;
}
What I want to achieve is to position my label and input field in one row, next to each other, nicely positioned with proper horizontal distances.
How can I do it?
Thank you!
panJames
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.