473,729 Members | 2,349 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

FORMs with grid layout

I'm writing a form with a grid layout (similar to the ones in
phpMyAdmin). The form will contain X number of columns and Y rows - all
cells containg INPUT elements.

As long as the data isn't tabular I want to avoid tables.
Is there a smart way (DIVs and CSS) to do this form without a table?
Could I consider a form like this as tabular data, and forget making it
tableless?

Thanks,

BT

Jul 24 '05 #1
8 8912
T. Bjarne wrote:
I'm writing a form with a grid layout (similar to the ones in
phpMyAdmin). The form will contain X number of columns and Y rows - all
cells containg INPUT elements.

As long as the data isn't tabular I want to avoid tables.
Are you sure it isn't tabular, don't make the same mistake other's have [1].
Is there a smart way (DIVs and CSS) to do this form without a table?
Don't abuse divs, you can apply styles to input elements just as easily.
Why is it that so many people think they need a divs and spans when
ever they need to control layout? See the comments in [1] for some
additional discussion about faking tables.
Could I consider a form like this as tabular data, and forget making it
tableless?


It depends on the content. If you describe what it is you are trying to
markup, someone may be able to help you decide whether or not it's tabular.

Are each of the inputs that will appear in the same row (or column)
logically related as a single group, and is each row (or column) a
distinct group from the others? Does the form still make logical sense
if they aren't presented in tabular form?

[1] http://www.mezzoblue.com/archives/2005/03/31/too_far/

--
Lachlan Hunt
http://lachy.id.au/
http://GetFirefox.com/ Rediscover the Web
http://GetThunderbird.com/ Reclaim your Inbox
Jul 24 '05 #2

T. Bjarne schrieb:

As long as the data isn't tabular I want to avoid tables.
Is there a smart way (DIVs and CSS) to do this form without a table?
The natural choice is display: table, display table-row, display:
table-cell, of course.

In Mozilla, Firefox, other Gecko-Browsers, Opera, Konqueror, any modern
browser, this will do the job.

Unfortunately, there is one browser of a company, which does not need to
fix its CSS bugs, because the company is powerful enough to make
everybody write around them.
Hans-Joachim


--Du hast aber doch nicht ernsthaft damit gerechnet, daß der IÄ viel CSS
jenseits von "color" und "font-size" unterstützt, oder?


Wiejetz ... der IE5.x kann schon "color"? Wolfgang Krietsch
Jul 24 '05 #3
Gazing into my crystal ball I observed "T. Bjarne" <tb*****@yahoo. no>
writing in news:11******** *************@l 41g2000cwc.goog legroups.com:
I'm writing a form with a grid layout (similar to the ones in
phpMyAdmin). The form will contain X number of columns and Y rows - all
cells containg INPUT elements.

As long as the data isn't tabular I want to avoid tables.
Is there a smart way (DIVs and CSS) to do this form without a table?
Could I consider a form like this as tabular data, and forget making it
tableless?

Thanks,

BT


I have an example that might be just the ticket:
<http://www.intraproduc ts.com/beta/requiredform.as p>

The scripting language is ASP, but it can be ported to whatever you need.
The CSS used the label element to give the visual structure and also is
used to alert a user that an error was made.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 24 '05 #4
T. Bjarne wrote:
I'm writing a form with a grid layout (similar to the ones in
phpMyAdmin). The form will contain X number of columns and Y rows - all
cells containg INPUT elements.

As long as the data isn't tabular I want to avoid tables.
Is there a smart way (DIVs and CSS) to do this form without a table?
Could I consider a form like this as tabular data, and forget making it
tableless?


If it looks better in a table, use it. It is absurd to think that
*only* 'tabular data' should be rendered in a table.

The HTML specification itself suggests as much, even suggesting the
use of nested (gasp! kill the heretic!) tables as well as using them
for laying out forms. From RFC 1942 on which the HTML 4 table model
is based:

"Tables can contain a wide range of content, such as headers,
lists, paragraphs, forms, figures, preformatted text and even
nested tables."

<URL:http://www.ietf.org/rfc/rfc1942.txt>

More information can be found on tables here:

<URL:http://www.w3.org/TR/html401/appendix/notes.html#note s-tables>

And here, where "[t]wo types of tables are discussed: tables used to
organize data, and tables used to create a visual layout of the
page."

<URL:http://www.w3.org/TR/WCAG10-HTML-TECHS/#tables>

The big issue with using tables for layout is that they can easily
break accessibility rules. If putting something into a table does
not hinder accessibility (or accessibility is suitably addressed) and
it does not create unnecessarily complex markup, there is no reason
not do it - even if what is to be displayed isn't 'tabular data'.

--
Fred
Jul 24 '05 #5
This CSS only works in IE.

Jul 24 '05 #6
Gazing into my crystal ball I observed "Toby Miller"
<tm*****@tobymi ller.com> writing in news:1112632856 .071456.217430
@f14g2000cwb.go oglegroups.com:
This CSS only works in IE.


Yikes! You're right. I've been using this in Opera for months and never
realized that.

--
Adrienne Boswell
http://www.cavalcade-of-coding.info
Please respond to the group so others can share
Jul 24 '05 #7

"Fred Oz" <oz****@iinet.n et.auau> wrote in message
news:42******** *************** @per-qv1-newsreader-01.iinet.net.au ...
T. Bjarne wrote:
I'm writing a form with a grid layout (similar to the ones in
phpMyAdmin). The form will contain X number of columns and Y rows - all
cells containg INPUT elements.

As long as the data isn't tabular I want to avoid tables.
Is there a smart way (DIVs and CSS) to do this form without a table?
Could I consider a form like this as tabular data, and forget making it
tableless?


If it looks better in a table, use it. It is absurd to think that
*only* 'tabular data' should be rendered in a table.


<snip>

Thank you Fred Oz!

Carla
Jul 24 '05 #8
c.thornquist wrote:
"Fred Oz" <oz****@iinet.n et.auau> wrote in message
news:42******** *************** @per-qv1-newsreader-01.iinet.net.au ...
T. Bjarne wrote:
I'm writing a form with a grid layout (similar to the ones in
phpMyAdmin ). The form will contain X number of columns and Y rows - all
cells containg INPUT elements.

As long as the data isn't tabular I want to avoid tables.
Is there a smart way (DIVs and CSS) to do this form without a table?
Could I consider a form like this as tabular data, and forget making it
tableless?


If it looks better in a table, use it. It is absurd to think that
*only* 'tabular data' should be rendered in a table.

<snip>

Thank you Fred Oz!

Carla


I go along with the tabular data for tables thing. To me, most of a
form *is* tabular data: question/answer. I often use tables to layout a
form as it is rediculous to do:
<form>
<div>question </div><div>answer </div>
<div>question </div><div>answer </div>
<div>question </div><div>answer </div>
<div>question </div><div>answer </div>
</form>
Actually, that doesn't even work since you need something between each
row set to {clear:both} and then you still have a problem when things
wrap making things line up incorrectly. I have done it using divs,
paragraphs, spans, etc. and keep falling back to tables because a table
makes the most sense to line things up in columns and rows (definition
of tabular data).

--
Stan McCann "Uncle Pirate" http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) :( http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein
Jul 24 '05 #9

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

Similar topics

39
5678
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
4
2348
by: NWx | last post by:
Hi, I develop an ASP.NET app which should be used from Internet, so I don't have control over what browsers will be used. I don't want to target every possible users, so I don't really mind is some user with a very ancient browser (Netscape 3 or 4, or IE 3) won't be able to view the site properly. However, I want that modern browsers (IE 5+, Netscape 6, Mozilla, Opera, and possible other browsers with new versions) to be able to...
6
4656
by: Don Collins | last post by:
Can anyone point me to a white paper discussing the advantages / disadvantages to using “grid layout” vs. “flow layout” on webforms? I’m looking to address performance issues in particular.
2
1287
by: Jerry Camel | last post by:
I'm using Grid Layout basically because it was the default, but I've got the whole page designed and changing to Flow layout would be a royal pain, I think... But now, I find I need to position a label on the far right of the screen. Is there a way to that in Grid layout so that it's essentially docked on the right regardless of the client's window width? Thanks. Jerry
5
3945
by: Mahesh Devjibhai Dhola [MVP] | last post by:
Hi, How to achieve effect of LayoutManagers like java has Grid, Flow, Border etc layouts in .Net? The case is: I am creating the form runtime and adding controls on run-time so at that time its very hactic to manipulate about other control's sizes, positions etc so there must be easy way to do such things like what Java LayoutManagers allow without worring the actual positions in pixels. It allows me to add, insert etc operation without...
3
2362
by: Dave | last post by:
I am designing a web page using VS2003 ASP.NET. The page contains various DIVs (panels), one of which is in grid layout. The controls in this DIV render correctly in IE, but when using Firefox they are incorrectly positioned. VS sets the positioning of the controls to absolute, and because the DIV is to the right of another DIV Firefox (correctly, I suspect) positions the controls absolutely, which means they are too far to the left, while...
117
18548
by: phil-news-nospam | last post by:
Is there really any advantage to using DIV elements with float style properies, vs. the old method of TABLE and TR and TD? I'm finding that by using DIV, it still involves the same number of elements in the HTML to get everything just right. When you consider the class attribute on the DIV elements, there's not much size savings anymore for using DIV. There are other disadvantages to not using TABLE/TR/TD, such as the lack of ability...
6
7997
by: Romulo NF | last post by:
Greetings again to everyone, Im back to show this grid componenet i´ve developed. With this grid you can show the data like a normal table, remove the rows that you need, add rows, import data, call determined functions, and edit the data already present What will you need to use the grid? A table with standard markup and an ID to call the script that will turn the table into a grid Parameters: tabelaID => id of the table that will...
2
3529
by: skanemupp | last post by:
so my little calculator works perfectly now. just having some trouble with the layout. this whole tkinter-thing seems to be more tricky than it should be. how can i make the 4 column of buttons have the same distance and size between them as the other 3 columns? and how can i make the top entry end where the 2nd row entry ends(meaning the top entry will be longer)? why are the 4th row split from the others? hard to fix the problems...
0
8917
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
8761
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,...
0
9426
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9200
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
9142
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
6022
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4795
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3238
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
2
2680
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.