Thu, 2013-01-10 02:22
Hello,
I'm new to CSS.
I was trying to make a simple form, however I don't know how to align 2 boxes.
Can someone please tell me how I could do it?
Code:
<form action="" method="get"> <ul> <li> <label for="name"> Enter your First and Last name</label> <input id="name" name="name" /> </li> <li> <label for="age" id="age"> Enter your age</label> <input id="age" name="age" /> </li> <li> <label for="comments"> Enter your comments</label> <textarea id="comments" name="comments"> </textarea> </li> <li> <label for="Favorite language"> What is your favorite language</label> <input type="checkbox" id="Python" name="Python" />Python</input> <input type="checkbox" id="Javascript" name="Javascript" />Javascript</input> <input type="checkbox" id="CSS" name="css"> CSS</input> </li> <input type="submit" /> </ul </form> form li { font-family: sans-serif; padding-bottom: 15px; font-weight: bold; } form ul { list-style: none; padding-left: 0; text-align: left; } textarea { width: 300px; height: 150px; } form { width:250px; } label { display: block } #comments { padding-left: 1px; } #age { padding-right: 15px; position: relative; left: 250px; bottom: 58; }
Thanks
Thu, 2013-01-10 21:09
#1
Hi mendy, Can you be more
Hi mendy,
Can you be more specific on what you are trying to align? ... I would assume your form input boxes, but don't know if you are trying to vertically align beneath each other, or what layout you are trying to achieve.
I am also new to CSS, but I would hazard a guess that you need well controlled DIV's with text-align or float tags to place them exactly where you need them to be.
Hope this helps?
All the best,
Cal
Fri, 2013-01-11 11:31
#2
You can align that fields by
You can align that fields by using "div" tag or Table.
[wait 'til you've earned a sig line ~gt]