Forum Moderators: phranque

Message Too Old, No Replies

? about replacing tables with?

         

abby498

10:34 pm on May 12, 2003 (gmt 0)



I want to do away with tables. When I tried to make one site
XHTML valid, I found out that one can not have a form with inputs distributed though out a table and be XTHML valid. Not a problem I thought. Well, as you know, the div tag forces a line break and the span tag does not allow for width and height.
What is the proper way to create a row with different widths within that row? Or am I stuck with tables for this?

I thank you in advance for your time,
Abby

chris_f

8:00 am on May 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Welcome to WebmasterWorld Abby,

I'm afraid I don't know the answer to your question, however, I believe you should start searching in the css forum as I remember a similar thread appearing there a little while ago.

Chris

bird

12:53 pm on May 13, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You need to turn your form into an inline element (by default it's a block element with similar characteristics as eg. a <p></p> ).

The following should validate fine as XHTML:

<form method="GET" action="/x.cgi" [b]style="layout:inline;"[/b]>
<table>
<tr><td>first label:</td>
<td><input type="text" name="first_input"></td></tr>
<tr><td>second label:</td>
<td><input type="text" name="second_input"></td></tr>
</table>
</form>