473,396 Members | 2,092 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

easier way to layout a web form

I am spending too much time thinking of nesting tables within tables to
get the form layout that I want.

a simple example:

Sub heading:
property text: entry field
property text: entry field
Sub heading:
property text: entry field
property text: entry field

In this case I am using nbsp; before the property text to get the
indenting effect I want, but that is too repetitive.

Sometimes I would like to split a form into two or more sub tables, one
beneath the other. But then I cant get the columns of the tables to
align with each other.

Another issue is switching a form from display mode to entry mode. My
solution there is one set of input boxes are visible in change mode,
another set of label controls are visible in display mode. But that is
too many controls, each with an ID, having to be marked visible or not
in the code behind.

I can think of solutions to these issues using server controls, but as
much as I like to do that sort of thing, that approach does not earn me
any money and has brought me to the edge of financial ruin!

Do I just have a mental block when it comes to web form layout. Does
ASP.NET have a simple property sheet control? Too often I end up with
tables within rows within cells within tables that results in a rats
nest of parallel html and code behind.

what can I say. What book have I not read? Does CSS address this sort
of thing? I notice CSS does not address html tables much. Is there a
good reason for that?

thanks,

-Steve

Nov 19 '05 #1
2 2463
No clear question there mate, but i can try help with some pointers

1) Indenting without  

Instead of using  , you can use a table cell and set the width

So your example would look something like this:

<table border=0 >
<tr>
<td colspan="4">
Sub Heading
</td>
</tr>
<tr>
<td width="12"></td>
<td>
property text:
</td>
<td width="12"></td>
<td>
entry field
</td>
</tr>
</table>

2) Getting two table's columns to align nicely

One was you can do this is by specifying widths - making sure that text in
that column does not push the width further than you specified.
This can be achieved by forcing text to wrap, or using a div tag with
overflow: auto - and ofcourse probably a million other ways too :)

3) Change mode and display mode

Not sure what you mean here

4) CSS and html tables

I think the major drive CSS has is into DIV tags.
Using these as columns, you can specify there width and positioning, and get
much the same effect as tables create. These can be created as styles in
your style sheet and attached to the div column.
We recently had our html code reviewed, and we were advised to use this
method. They infact said you should only use table to list data in a table,
and not to layout a website.
But i personally love using tables as thats the way i like laying out a
website.
Hope my comments help

Cheers

GM

"Steve Richter" <St************@gmail.com> wrote in message
news:11**********************@o13g2000cwo.googlegr oups.com...
I am spending too much time thinking of nesting tables within tables to
get the form layout that I want.

a simple example:

Sub heading:
property text: entry field
property text: entry field
Sub heading:
property text: entry field
property text: entry field

In this case I am using nbsp; before the property text to get the
indenting effect I want, but that is too repetitive.

Sometimes I would like to split a form into two or more sub tables, one
beneath the other. But then I cant get the columns of the tables to
align with each other.

Another issue is switching a form from display mode to entry mode. My
solution there is one set of input boxes are visible in change mode,
another set of label controls are visible in display mode. But that is
too many controls, each with an ID, having to be marked visible or not
in the code behind.

I can think of solutions to these issues using server controls, but as
much as I like to do that sort of thing, that approach does not earn me
any money and has brought me to the edge of financial ruin!

Do I just have a mental block when it comes to web form layout. Does
ASP.NET have a simple property sheet control? Too often I end up with
tables within rows within cells within tables that results in a rats
nest of parallel html and code behind.

what can I say. What book have I not read? Does CSS address this sort
of thing? I notice CSS does not address html tables much. Is there a
good reason for that?

thanks,

-Steve

Nov 19 '05 #2


Grant Merwitz wrote:
No clear question there mate, but i can try help with some pointers
4) CSS and html tables

I think the major drive CSS has is into DIV tags.
Using these as columns, you can specify there width and positioning, and get
much the same effect as tables create. These can be created as styles in
your style sheet and attached to the div column.
I'll check into this.

We recently had our html code reviewed, and we were advised to use this
method. They infact said you should only use table to list data in a table,
and not to layout a website.
But i personally love using tables as thats the way i like laying out a
website.
Hope my comments help


definitely. thanks!

-Steve

Nov 19 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Peter | last post by:
For some unknown reason my Form Layout Window has stopped showing a form on it. I can open & close the window, set docking on/off but no form. The right click start-up options are also greyed out....
39
by: Zak McGregor | last post by:
Hi all Are there any good solutions to aligning form field names and input boxes without resorting to tables? I am struggling to do this nicely at the moment. Thanks Ciao Zak
2
by: Mario T. Lanza | last post by:
Greetings, I have been developing websites in CSS for a couple years; I claim to be no expert, but certain things could definitely be easier. Consider the box model and it's different...
66
by: Mitchell S. Honnert | last post by:
In some recent posts, I've seen people who seem to be waxing nostalgic with respect to the "ease of use" of Visual Basic 6. I can't quite put my finger on it, but they seem to be implying that VB6...
10
by: Luke | last post by:
Hi. I am trying to make correct layout, here is an example of (dynamically generated content via jsp): http://localhost/www/layout.htm Most outer div is positioned absolute (if not then it...
3
by: Samuel Shulman | last post by:
I am looking for good guidance for positioning controls on the form.document, it is absolute nightmare and I don't know where to begin Thank you, Samuel Shulman
14
by: Anoop | last post by:
Hi, I am new to this newsgroup and need help in the following questions. 1. I am workin' on a GUI application. Does C# provides Layout Managers the way Java does to design GUI? I know that it...
2
by: Brian Tkatch | last post by:
Not sure if this is the way it's supposed to be, but after a Layout event on an MDI form, the form's new width is set, but the MDIClient's width is not. As an example, start a new Windows...
6
by: =?Utf-8?B?ZHNoZW1lc2g=?= | last post by:
Hello, I have a windows form with a TreeView control. When I first open the tree all nodes are colapsed. Then, I expand some of them and close the form. When I call Form.showDialog() once again...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.