PDA

View Full Version : HTML Help



Flametongue
03-10-2005, 07:45 PM
How do you create a space between a word and a text box, or list box or radio button so i can align it all up. Also i have this assignment to do and could someone explain this to me.

Your page should follow the following specifications:

A form where people will be able to enter their personal details. This should include all types of input seen in the lecture (text, password, radio buttons, checkboxes, textarea, and both select types) used appropriately.
A table with several cells and rows with background colors to format the above form

I know the bit about this form creating part but i don't understand this:

A table with several cells and rows with background colors to format the above form. How do i do this. BTW i am using notepad.

Cheers

Rick Phlegm
03-11-2005, 01:46 AM
Use a number of non-breaking spaces:

 

Alternatively just use tables to lay it out properly. Declare a table like this:

<table width="90%" border="0" cellspacing="5" cellpadding="0">
<tr>
<td>some text</td>
<td>more text</td>
</tr>
</table>

Where <td> stands for a table's column contents and <tr> stands for rows. You can fiddle around with the variables in the table declaration, for example removing the % sign for the width variable sets the width in pixels.

Flametongue
03-11-2005, 10:24 AM
cheers for that

tesco
03-11-2005, 01:28 PM
in each <td> OR <tr> OR <table> you can add background="#whatever" to add a background...i think.
I normally do things through css, have you learnt that stuff yet?

Flametongue
03-11-2005, 01:33 PM
lol we have just started we are currently learning images + forms etc

sparsely
03-11-2005, 03:49 PM
non nonono non no bnon onooooooooooooooooo
learn to make use of the <label> tag also

tables...NO!
all you need is

<div class="form">
<p><label for="username">Username:</label><input type="text" name="username" id="username" class="text" /></p>
</div>

then your css could look something like this:


label { cursor:pointer; padding-right:5px; }
input.text { text-indent:7px; vertical-align:middle; }


or something similar.
much easier, less code than a table.

Flametongue
03-11-2005, 05:45 PM
lol that looks compilcated remember i just started learning html