Everything2
Near Matches
Ignore Exact
Full Text
Everything2

table driven html

created by mercy

(idea) by mercy (5.5 y) (print)   ?   (I like it!) Tue Jun 20 2000 at 0:06:32

In my opinion table driven html design affords the coder a great deal of power over the look, feel, and structure of an html document. Tables in html have been often missunderstood, and sometimes dubbed "evil." When used correctly tables can also aid liquid designand make a page viewable at almost any resolution.

The basics of html tables are simple enough, but table driven code tends to get a bit messy after the second and third nested tables, so it is good practice to indent the nested code. The following is an example:

<table width="200" cellpadding="1" cellspacing="0" border="0">
	<tr>
		<td bgcolor="#999999">
		<table width="198" cellpadding="0" cellspacing="0" border="0">
			<tr>
				<td bgcolor="#ffffff" height="100">
				this is just some text
				</td>
			</tr>
		</table>
		</td>
	</tr>
</table>

The previous code renders this pretty table similar to those found at customize.org and deskmod.com thanks to xtreme for the great tip! Both sites are great examples of liquid design that uses both fixed width tables and realtive widths (ie 90%, 50%, etc.)


(thing) by JeffMagnus (4.9 y) (print)   ?   (I like it!) Tue Jun 20 2000 at 0:35:16

It is suggested by standards organizations such as the W3C that one use CSS instead of using the table tag. CSS is supported by versions of Internet Explorer and Netscape Navigator greater than 3.0. CSS is reusable and helps to seperate formatting pecularities from the text of the page.

The following is an example:

<style type="text/css">
.pork {
  width: 200px;
  border: thin solid #999999;
  text-align: center;
  background-color: #ffffff;
}
</style>


<div class="pork">this is just some text</div>

(idea) by Smigs (9.2 mon) (print)   ?   (I like it!) Wed Mar 07 2001 at 17:58:59

The table tag was originally intended to as a way to represent data in rows and columns, like a spreadsheet. Along the way, however, it was hijacked and used as a navigation system. This, technically, is an abuse of tables.

The alternatives, such as using div tags in combination with CSS positioning, have only just become viable with the advent of Gecko-based browsers, IE5.5 and Opera 5 becoming free.

However, the table navigation system is unlikely to die, since lots of people believe it to be the only way to produce a viable navigation system (apart from frames), and they know nothing of style sheets. And, of course, there is the problem of old browsers, which lack the proper support of div and CSS. Particular in this problem is Netscape 4, since a lot of users haven't upgraded to Netscape 6 (I don't really blame them, it is based on the unfinshed Mozilla code. - Don't take that the wrong way, I use Mozilla every day!). These problems will ensure that table-driven html sticks around for a while.


printable version
chaos

liquid design HTML tab Ideas how to Everythingify HTML Tables CSS
Tom Christiansen table Don't indent HTML paragraphs Evil
CSS positioning HTML HTML atrocity HTML Satan
Gecko div URL Mozilla
The 5k competition Netscape Navigator object-oriented programming E2 HTML tags : Chapter 5
Futurama timeline Taking the E2 Zen Theme for a Spin People, Places, Things & Ideas Notelet nodelet HTML tricks
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
Nodes to live by:
Fuel cell
Do Not Shoot: Non-Combatant
Amélie
Satsuma
Canada
Gram-Schmidt Theorem
Dragon
scrambled eggs
Proto-Indo-European
A trip to a minimalist restaurant
Dick Whittington
From across a crowded room
Landsknecht
New Writeups
SubSane
Making Love to a 9-Foot Woman(person)
Ouzo
Thoughts(idea)
antigravpussy
I fall silent, listening. The breadcrumbs are talking about us(person)
calgon
Buffalo Bill by the pool(poetry)
gate
Anarchy is Order(idea)
ushdfgakjasgh
Scribeling(thing)
XWiz
Trism(review)
artman2003
Briefcase Full of Souls - Part I(fiction)
Dreamvirus
Alan Ladd(person)
waverider37
Harold Holt(person)
The Debutante
Until death do us part(fiction)
Ysardo
a brother to a sister(personal)
antigravpussy
your warm whispers(personal)
Clarke
Multiculturalism(idea)
aneurin
Earl of Landaff(person)
Everything 2 is brought to you by the letter C and The Everything Development Company