473,624 Members | 2,534 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Alternative for tables

93 New Member
Hi i was wondering what is the alternative for tables in html. I was told that using tables is not the ideal way, so what other alternative are there. I pressume you can use a CSS but how would i go about doing this.

Thanks if anyone can help
Jun 27 '07 #1
6 2236
nathj
938 Recognized Expert Contributor
Hi,

I'm not sure how to cross reference posts, but here's the answer I put on a different post earlier today:

CSS
Expand|Select|Wrap|Line Numbers
  1. div.row 
  2. {
  3.     clear: both;
  4.     padding-top: 3px;
  5.     padding-bottom: 5px;
  6. }
  7.  
  8. div.row span.label 
  9. {
  10.     padding-left: 10px;
  11.     padding-right: 0px;
  12.     float: left;
  13.     width: 100px;
  14.     text-align: right;
  15. }
  16.  
  17. span.labelwarning 
  18. {
  19.     padding-left: 10px;
  20.     padding-right: 0px;
  21.     float: left;
  22.     width: 100px;
  23.     text-align: right;
  24.     color: #ff0000;
  25. }
  26.  
  27. div.row span.formw 
  28. {
  29.     float: right;
  30.     width: 455px;
  31.     text-align: left;
  32.  
  33.  
HTML (for a dummy form that I am working on)
Expand|Select|Wrap|Line Numbers
  1. <form id="personal" action="application.php?step=2" method="post">
  2.     <!-- 
  3.     Personal details
  4.     -->    
  5.     <div class="row">
  6.         <h4 class="eventListItem">Personal Details </h4>
  7.     </div>
  8.  
  9.     <div class="row">
  10.         <span class="labelwarning">
  11.             Title:
  12.         </span>
  13.         <span class="formw">
  14.             <input id="title" type="text" maxlength="15" size="47" />
  15.         </span>
  16.     </div>
  17.  
  18.     <div class="row">
  19.         <span class="labelwarning">
  20.             Forename(s):
  21.         </span>
  22.         <span class="formw">
  23.             <input id="forename" type="text" maxlength="30" size="47" />
  24.         </span>
  25.     </div>
  26.  
  27.     <div class="row">
  28.         <span class="labelwarning">
  29.             Surname:
  30.         </span>
  31.         <span class="formw">
  32.             <input id="surname" type="text" maxlength="30" size="47" />
  33.         </span>
  34.     </div>
  35.  
  36.     <div class="row">
  37.         <span class="label">
  38.             Note:
  39.         </span>
  40.         <span class="formw">
  41.             <textarea id="note" cols="44" rows="8">
  42.             </textarea>
  43.         </span>    
  44.     </div>
  45.  
  46.         <div class="row">
  47.         <h4 class="eventListItem">Access Details </h4>
  48.     </div>
  49.  
  50.         <div class="row">
  51.         <span class="labelwarning">
  52.             Username:
  53.         </span>
  54.         <span class="formw">
  55.             <input id="username" type="text" size="47" />
  56.         </span>
  57.     </div>
  58.  
  59.     <div class="row">
  60.         <span class="labelwarning">
  61.             Password:
  62.         </span>
  63.         <span class="formw">
  64.             <input id="password" type="password" maxlength="18" size="47" /> 
  65.              (6-18 characters)
  66.         </span>
  67.     </div>
  68.  
  69.  
Don't worry about the <h4> class, this is simply a style issue for my site. I can't show it to you in operation as it's still under development and as such is only on the local network.

Have fun playing around with this.

Nathan
Jun 27 '07 #2
bettor
27 New Member
Hi,

I don't know who told you that tables are not the best way. I really don't know if a best way exists. My opinion is to learn from the best...and there I go and look at Google.com or gmail.com and I see that it's all designed using tables...I think I shouldn't comment any further...but to make your layout tableless you can use CSS but be careful since many features will look different in different browsers...try to keep up to CSS 1 and some CSS 2

Good luck
Jun 27 '07 #3
drhowarddrfine
7,435 Recognized Expert Expert
Tables were originally created for data presentation and should only be used for that now. At one time, tables were used for page layout because it was the only reliable means available in the early days of the web. Nowadays, CSS is the best way to layout pages.

Generally, the only problems you may encounter with using CSS is with IE. If you follow standards, however, and test in a modern browser, such as Firefox or Opera, your problems will be minimal.
Jun 27 '07 #4
MMcCarthy
14,534 Recognized Expert Moderator MVP
I'm not sure how to cross reference posts, but here's the answer I put on a different post earlier today:
Hi Nathan,

Just enclose the link in url tags, it should create a hyperlink

i.e. [url=http://www.urlhere] to open and close with backslash url in square brackets.

This should work.

Mary
Jun 27 '07 #5
nomad
664 Recognized Expert Contributor
I quess I still from the old school and I need to learn more css2...
Jun 27 '07 #6
nathj
938 Recognized Expert Contributor
Hi Taftheman,

Have you got you system running now? This topic has provided some good discussion. Ultimately any layout can and should be done with CSS. The idea of keeping the presentation separate from the content is pure genius and it is making my life easier.

Let me know how you got on.

nathj

ps taftheman - from Wales?
Jun 28 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

20
24987
by: Tammy | last post by:
What would be a good alternative to using frames? I need something that will section my webpage into two halves and can change both frames on a single click. Thanks in Advance, Tammy
13
5820
by: Mark | last post by:
I am looking for a switchboard creator alternative for my MDB. Can anyone help me? Thanks for your help, Mark
3
10628
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems that are hard to find. The main problem I am having right now is that I have a report that is sorted by one of these lookup fields and it only displays the record's ID number. When I add the source table to the query it makes several records...
1
1458
by: Russell | last post by:
Hi, I've been reading a lot about not using lookups in tables lately. Thus far, what I've been able to understand from my reading is this: - Do not use lookup fields in tables because they hide what's really stored (e.g. 'Joe Bloggs' is displayed, '4' is stored as the ID) - Instead, use combo boxes on forms, taking their values from tables or queries.
2
1131
by: Thilaka | last post by:
Hi guys, I want to know if there's an alternative to stored procedures. Ie, when updating certain tables of SQL server, i would like to update a few other tables with vaules retrieving from some VB.Net methods or properties? (Because I don't think i can access the currently exposed VB.Net objects from the SQL stored procedures). --
13
4229
by: Pamela via AccessMonster.com | last post by:
Hi All; I work for a company which is currently utlizing MS Access on a shared drive where people from all over the country access. Because all are wishing to view a single database maintained solely by us (in Florida), each region cannot have their own individual database on their local servers (otherwise we would have to update several databases as opposed to one central database). We have tried splitting the database, but it is still...
2
3698
by: Shilpa | last post by:
Hi All, I want to pass XML and the data in the XML should be stored in the tables of the database. However, I do not want to use the OpenXML statement. Please let me know. Regards, Shilpa
2
2331
by: rizwaaan | last post by:
i just got a challenge questions to produce the same results without using tables in a google page the link is http://news.google.com/nwshp?hl=en&tab=wn&q= please can someone help me out...what could be alternative to tables in HTML/CSS please its urgent
1
2014
by: beary | last post by:
I was using a backup script I found which had $tables = mysql_list_tables($database); for($i = 0; $i < mysql_num_rows($tables); $i++) { $table = mysql_tablename ($tables, $i); ...rest of code It worked perfectly. However, I only want to backup particular tables. So thinking that mysql_list_tables won't let me choose certain tables, I tried using
0
8231
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
8168
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
8672
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...
0
8614
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8471
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...
1
6107
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
5561
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();...
1
2603
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
1
1780
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.