![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| ||||
| ||||
|
|
Peter Foti wrote: I have a form that contains a 2 column table. In the left column is the description for a particular input (ie - "First Name", "Last Name", "Phone Number", etc.). In the right column is the input element. The left column is right aligned and the right column is left aligned. I would like to replace this table with code that does not use a table for layout, Note that one could make the case that this is tabular data, and belongs in a table. I decided not to use table markup for my forms, fwiw. |
|
was hoping someone might be able to help me with the HTML and corresponding CSS. My thoughts are that the HTML will be something like this: form action="formhandler.asp" method="post"> <div> <span class="inputdesc">First Name:</span Use the label element instead of the semantically neutral span element. |

|
span class="forminput"><input type="text" name="firstname" size="20" maxlength="50"></span You don't need a span here. Just the input, ma'am. |

|
Note that I want all of the "inputdesc" items to be right aligned, and all of the "forminput" items to be left aligned. Oddly enough, this looks very "table-ish". ![]() Indeed. See above. Any input (regarding the HTML above and what the CSS will need to look like) is greatly appreciated. an example of a form I did: http://www.julietremblay.com/site/contact.html |

#3
| |||
| |||
|
| http://www.julietremblay.com/site/contact.html Thanks. I'm sure this will prove useful. ![]() |
#4
| |||
| |||
|
|
In article <votg5jp9b5jlef (AT) corp (DOT) supernews.com>, "Peter Foti" <peterf (AT) systolicnetworks (DOT) com> wrote: http://www.julietremblay.com/site/contact.html Thanks. I'm sure this will prove useful. ![]() One of mine, if you're in for variation: http://www.joukedevries.nl/contact/ |

#5
| |||
| |||
|
|
I have a form that contains a 2 column table. In the left column is the description for a particular input (ie - "First Name", "Last Name", "Phone Number", etc.). In the right column is the input element. The left column is right aligned and the right column is left aligned. I would like to replace this table with code that does not use a table for layout, |
#6
| |||
| |||
|
|
"Kris" <kristiaan (AT) xs4all (DOT) netherlands> wrote in message news:kristiaan-1E6036.18233416102003 (AT) news1 (DOT) news.xs4all.nl... In article <votg5jp9b5jlef (AT) corp (DOT) supernews.com>, "Peter Foti" <peterf (AT) systolicnetworks (DOT) com> wrote: http://www.julietremblay.com/site/contact.html Thanks. I'm sure this will prove useful. ![]() One of mine, if you're in for variation: http://www.joukedevries.nl/contact/ The more the merrier. ![]() |
#7
| |||
| |||
|
|
In article <votbijtdukvi19 (AT) corp (DOT) supernews.com> in comp.infosystems.www.authoring.stylesheets, Peter Foti peterf (AT) systolicnetworks (DOT) com> wrote: I have a form that contains a 2 column table. In the left column is the description for a particular input (ie - "First Name", "Last Name", "Phone Number", etc.). In the right column is the input element. The left column is right aligned and the right column is left aligned. I would like to replace this table with code that does not use a table for layout, It's your choice of course, but IMHO what you have _is_ a table and table> markup is appropriate. The descriptions are <th> elements and the input elements are <td>. Do you see any particular benefit in changing this to CSS? I think the result (even without counting the separate style sheet) will be longer than the original. |
#8
| |||
| |||
|
|
form action="formhandler.asp" method="post" div span class="inputdesc">First Name:</span span class="forminput"><input type="text" name="firstname" size="20" maxlength="50"></span /div div span class="inputdesc">Last Name:</span span class="forminput"><input type="text" name="lastname" size="20" maxlength="50"></span /div ... /form Note that I want all of the "inputdesc" items to be right aligned, and all of the "forminput" items to be left aligned. Oddly enough, this looks very "table-ish". ![]() Any input (regarding the HTML above and what the CSS will need to look like) is greatly appreciated. |
![]() |
| Thread Tools | |
| Display Modes | |
| |