473,782 Members | 2,525 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 2483
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.goo glegroups.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
13501
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. Any idea how I can fix this? Thanks --
39
5686
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
1840
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 implementations: http://tantek.com/CSS/Examples/boxmodelhack.html Microsoft's way and the web standards way. Ironically, though
66
3732
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 was simpler to use than VB.NET, that it was somehow easier to write programs in VB6 than in VB.NET. I have to admit I'm astonished by this attitude. I can't see any rationality to the idea that, on the whole, VB6 is easier than VB.NET. I...
10
9212
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 will not grow when content inside div.body is greater than width of window of user agent), anyway anyone knowlegable can see it in sources...
3
1546
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
4863
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 can be done using the designer but I intentionally don't want to use that. The one reason is that you cannot change the code generated by the designer. The other could be that you have more free hand and control to design your GUI. 2....
2
2328
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 Application, and for the code use: Public Class Form1 Dim TextBox1, TextBox2, TextBox3 As New TextBox Dim The_MDIClient As MdiClient
6
3224
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 all nodes are collapsed again. I would like the layout to be saved (nodes which I expanded should stay expanded). I don't change the ImageList, Scrollable, CheckBoxes or StateImageList properties of the control between closing and reopening the...
0
9641
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9480
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
1
10080
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9944
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8968
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7494
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5378
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5511
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4044
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.