Forum Moderators: open

Message Too Old, No Replies

textbox alignment problem.

         

thcc2

10:08 am on Jan 9, 2006 (gmt 0)

10+ Year Member



here is my code where the "Search by name" the table is appear bigger than the other two in a pop-up.
Can someone pls help me.
Thks in advance

<table border=1 cellspacing="0" cellpadding="12" align = left>
<tr><th>Search by Name</tr></th>
<tr><th><input type="text" name="search" size="20">
<input type="button" name="Search" value="Search"></th></tr>
</table>

<table border=1 cellspacing="0" cellpadding="12" align=left>
<tr><th>Search by Level</tr></th>
<tr><th><input type="text" name="search" size="20">
<input type="button" name="Search" value="Search"></th></tr>
</table>

<table border=1 cellspacing="0" cellpadding="12"align=left>
<tr><th>Search by Class</tr></th>
<tr><th><input type="text" name="search" size="20">
<input type="button" name="Search" value="Search"></th></tr>
</table>

encyclo

11:15 am on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to the forums thcc2!

There's a typo here which may have something to do with it:

<tr><th>Search by Name[b]</tr></th>[/b]

Should read

[b]</th></tr>[/b]

The HTML validator [validator.w3.org] should catch the error. It happens three times in your markup snippet. :)

dwighty

10:15 pm on Jan 10, 2006 (gmt 0)

10+ Year Member



You have also done...

<table border=1 cellspacing="0" cellpadding="12" align = left>

change the

align = left

to

align="left"

thcc2

2:48 am on Jan 11, 2006 (gmt 0)

10+ Year Member



thks encyclo u mean have to do something like this

<th><tr>Search by Name</th></tr>

?

[edited by: encyclo at 11:53 am (utc) on Jan. 11, 2006]
[edit reason] fixed code tags [/edit]

encyclo

11:53 am on Jan 11, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



<th><tr>Search by Name</th></tr>

No, you always need to close elements in the order that you opened them: in this case, you open a table row with

<tr>
, then a table heading with
<th>
. After your text you need to close the table header first with
</th>
and then close the row with
</tr>
. This will ensure your content is well-formed: the HTML validator [validator.w3.org] will help you with this. :)

[b]<tr><th>[/b]Search by Name[b]</th></tr>[/b]