June 19, 201016 yr The form below has an email field, that is set with Js so that if you dont put in a "@" symbol, you cant submit the form. i need to align this element with the rest, but cant seem to. i have tried but that doesnt work, i have an image and a code: <span id="sprytextfield1"> <label for="Email:">Email:</label> <input type="text" name="Email:" id="Email:" /> <span class="textfieldRequiredMsg">A value is required.</span><span class="textfieldInvalidFormatMsg">Invalid format.</span></span> Thanks in advance, Ash
June 19, 201016 yr You shouldn't use as spacers. Set up the text in a left column with a fixed width and the input boxes in the right column. You can use px to style the input box width which is more precise than using cols="..." for them. You can set up the two columns with a table but many people use a list - the two li tags in each row have float: left; and fixed widths to make them side by side and then the float is cleared to start the next two side by side.
June 19, 201016 yr Author Ok dude thanks for the help...thing is when i put it into a table, label in one cell, element in other, the one that you MUST fill in doesn't work :\
June 19, 201016 yr Try this: html <p><label for="Email"><input type="text" name="Email:" id="Email:" /></p> css label{width:100px; display:block; float:left;} The label is given a width of 100px and floated left. This then gives you a uniform spacer between the label and the input element. Adjust the width to what ya need. You can use either <p> or <div> the wrap each row. Regs, Numb
June 19, 201016 yr Author Thanks for the help numb, im gonna post a link up soon so you guys can look at it. All im gonna say is its a resource site... (And my first EVER fully hand coded)
Create an account or sign in to comment