...

View Full Version : HTML Tables



Spankinator
05-26-2005, 10:18 PM
If anyone knows laying out webpages with tables...I need some help.
What I have is 2 rows 2 columns. The 2nd row 1st column is the cell
used for all the links on the webpage. In the 2nd row 2nd column, I
have a nested table to be the body of the website, where all the
content goes. It's the basic layout, a top, left side navigation and
right side content.


What is not working is the links. When you click on a link in the
table, it is supposed to open up in the nested table cell, but instead
it opens up in a whole new window. I've got this to work a while ago,
so I know it can be done, I'm just not sure how I got it to work, hehe.


I am new to making webpages and I know that frames are not the way to
go when laying out webpages. I heard that tables were better to use
when laying out webpages. Like I said though...I am new to making
webpages. If any of you can help, I'd appreciate it a lot! Thanks!

-Matt :cool:

Vapor
05-26-2005, 10:28 PM
You know, in all honesty I disagree with the fact that frames is not as good as tables. Frames allow you to open a site within that area. Here is what I suggest.

Make 2 websites that you want. Then merge them together using frames and it will work. If you need help with frames and/or attributes I will list them below:

<frameset></frameset>
Replaces the <body> tag in a frames document; can also be nested in other framesets
<frameset rows="value,value">
Defines the rows within a frameset, using number in pixels, or percentage of w idth
<frameset cols="value,value">
Defines the columns within a frameset, using number in pixels, or percentage of width
<frame>
Defines a single frame or region within a frameset
<noframes></noframes>
Defines what will appear on browsers that don't support frames


<frame src="URL">
Specifies which HTML document should be displayed
<frame name="name">
Names the frame, or region, so it may be targeted by other frames
<frame marginwidth=#>
Defines the left and right margins for the frame; must be equal to or greater than 1
<frame marginheight=#>
Defines the top and bottom margins for the frame; must be equal to or greater than 1
<frame scrolling=VALUE>
Sets whether the frame has a scrollbar; value may equal "yes," "no," or "auto." The default, as in ordinary documents, is auto.
<frame noresize>
Prevents the user from resizing a frame

I hope this helps you.

-vapor

Spankinator
05-27-2005, 12:44 AM
This helps a lot with frames. I realize frames will work fine, and am familiar with them also. However, I was looking to get away from frames.

Any other opinions on frames vs. tables vs. any other ways to layout webpages? Or if what I previously mentioned will even work.

I am new to making webpages and would like to know how others go about structuring the overall layout of their site. I.E. frames, tables, divs, etc.

Thanks.
-Matt :confused:

If need-be I will use frames, but from what I have read of books and others, frames are an old way of making websites, and when having a lot of content, loads slower. That's why I'm a little confused and would like your opinions. Thanks again!

_Aerospace_Eng_
05-27-2005, 06:09 AM
Wait what? Opening a link inside a table cell? Are you using an iframe? Why are you even using tables? They aren't for web design. If you are trying to move away from frames then why not move away from tables as well? Show us your code and we will be able to provide more answers.

Spankinator
05-27-2005, 11:51 PM
The reason I am using tables is so the webpage resizes automatically. Also, it will be viewable from any device, not just a computer. People will be able to view it from a PDA, Phone, etc. without any viewing troubles. I don't know of any other way right now to get webpages to auto-resize.

I did figure out the problem why the links weren't working (opening up in another cell). You create a template page with a parent table, then nest another table where you want the content of the webpage to go (the body). All the pages you create from then on have to include the parent table, and it has to be exactly the same. You can do whatever inside the nested table, but the parent table (# of cells and stuff) has to be the same in order for the links to work properly. I don't know why, but that is how it has to work.

-Matt

Basscyst
05-28-2005, 01:05 AM
I hate to break this to ya, but pda's are a reason to not use tables. Take aero's advice and post your code and let someone have a look. It's valuable info. :thumbsup:

Basscyst

ArcticFox
05-28-2005, 06:48 PM
Why are you even using tables? They aren't for web design.

LOL!

What are you talking about?

JamieR
05-28-2005, 06:55 PM
LOL!

What are you talking about?

He means that tables are for tabular data - numerical data etc rather than for website layouts. Website layouts are supposed to be done via CSS. Website layouts do not constitute tabular data. :)

Jamie.

ArcticFox
05-28-2005, 08:24 PM
OMG! Blah, blah, blah-bla, blaaaaaaaaa......

CSS people really need to get off your high-horses. "CSS only", "validated", "no tables", "no frames", plain boring easter-looking dictionarystyle blah blah bla... man, next you'll be dressing in bedsheets and telling everyone they have to be just like you. :rolleyes:


Spankinator: it's your site. You can design it however you like; tables, frames, iFrames, etc. Don't listen to these CSS cultists. If it shows up good in major browsers, then it doesn't matter how you get there. These people want you to code for their browsers - browsers no one's ever heard of. And they do it just to cry about MS/IE.

Plugging my site as always: http://arctic.ithium.net/
Frames, iFrames, tables, JS, png images... validator violator, and cross browser compatible IE4.01-IE6/NS4+/FFox/Moz1.6+/Opera7+

syrupcore
05-28-2005, 08:52 PM
It's true. CSSers are a bit wacko. I mean, I dunno why anyone would want to make a page easier to edit, compatible on more devices, user stylable, more accessible, quicker to download, and a little different from every tables+photoshop site stinking up the web.

yeah, total cultish freaks.

Where's a good place to buy bedsheets anyway?


Will

JamieR
05-28-2005, 09:52 PM
It's true. CSSers are a bit wacko. I mean, I dunno why anyone would want to make a page easier to edit, compatible on more devices, user stylable, more accessible, quicker to download, and a little different from every tables+photoshop site stinking up the web.


Thanks :rolleyes:

One of the reasons why people use CSS for layout rather than tables is because we want websites to be accessible to a lot of people in different browsers and platforms. Another reason is because CSS is, in a way, easier to code. Who wants slow loads, hard to design websites all the time? Wouldn't you prefer a faster loading, accessible, easy to update/maintain website?

People who know the benefits XHTML/CSS only advise people, they dont *make* them follow web standards.

just my views on this...

Jamie.

mark87
05-28-2005, 10:20 PM
Yea I don't wana turn this into a CSS vs ... thread, but since using CSS my sites are much faster, rank highly in search engines, and are far easier to update - one file versus changing each page individually. Once you make the change, you'll see why you'd want to use it. :)

rmedek
05-28-2005, 10:47 PM
OMG! Blah, blah, blah-bla, blaaaaaaaaa......

CSS people really need to get off your high-horses. "CSS only", "validated", "no tables", "no frames", plain boring easter-looking dictionarystyle blah blah bla...

If it shows up good in major browsers, then it doesn't matter how you get there. These people want you to code for their browsers - browsers no one's ever heard of. And they do it just to cry about MS/IE.

You're kidding right? You don't really believe that the push towards CSS is only to have things look good in browsers?

Maybe you need to have a good read on web standards (http://www.google.com/search?q=web+standards&sourceid=mozilla-search&start=0&start=0&ie=utf-8&oe=utf-8&client=firefox-a&rls=org.mozilla:en-US:official) and realize that the web is not all about displaying correctly on a computer monitor.

Like it or not, the Web is a technology--a constantly evolving communal one--and CSS "cultists" are only one of many who want to see it evolve in the proper direction.

Considering your website keeps touting forward-thinking science and technology I'd think you would understand that.

Oh, and I can think of at least fifty CSS-only sites that look so much better than yours, which breaks in my browser, BTW.

mrruben5
05-29-2005, 02:38 PM
To make a long story short: go take a look at a site like ebaumsworld and look at their code. Now look at a css site, eg stu's site (http://www.stunicholls.myby.co.uk/index.html) for the code. Also look at his archive for the different styles.

Stu has no images on his pages, and still his site looks more professional then any other common table site.

Just code is a reason to go CSS for me. And i'm not even talking about the other benefits...

ArcticFox
05-30-2005, 03:39 AM
Looks like another boring blog.

Looks like every other blog I've ever seen.

Looks like every other CSS/validated site I've ever seen.

Show me something new, exciting, different.
Show me a site where I couldn't tell it was done entirely in CSS.
Show me a site done entirely in CSS, that's validated, and that doesn't look like a home for the easter bunny.

rmedek
05-30-2005, 03:48 AM
I seriously wish you'd stop with the damn easter bunny argument. You could just as easily use a pastel color scheme in a table layout.

Why don't you do this: Find a website you think is better than a CSS-based one, and give a couple reasons why. Other than design, unless it's a design that could only be acheived with tables. Then at least you'd be contributing something somewhat meaningful.

If you're just going to keep *****ing about your need to code things to an outdated standard because they "look okay in the end" then maybe you need to spend more time arguing the Hutchinson Effect and less time wasting ours.

ArcticFox
05-30-2005, 07:35 AM
I seriously wish you'd stop with the [...] easter bunny argument. You could just as easily use a pastel color scheme in a table layout.

Yes we could, but we don't. But you'll always find that on every CSS encoded site. It's always the same, and I can pick those out without even looking at the code - they're all the same.


Show me a CSS/validated site that doesn't look like all the rest.

Show me one that doesn't make me want to raise multi-coloured Peeps that lay Cadbury Eggs.

Show me one that's not a blog, or talk about CSS through the whole site, or has that silly W3C image in one of the corners.

Show me the money! :D

Jalenack
05-30-2005, 07:50 AM
http://wired.com
http://espn.com

[ edit ]
Sry...bad examples...I'll find some don't you worry

http://www.capgemini.com/


^^ Now there's a damn good one, or is that too "pastel" for you?

http://www.klassische-gartenmoebel.de/

[/ edit]

Check out http://cssbeauty.com and look under the categories that aren't blogs

Yakisoba
05-30-2005, 09:16 AM
In know this thread has gone WAY off the original post, but here it is anyway.

http://www.csszengarden.com/
(this one may be a little too "easter" for some, so I took the liberty of posting some cool sites that can be found in the archives)

some cool ones:

http://www.csszengarden.com/?cssfile=http://www.css-praxis.de/cssocean/zenocean.css
(check out the diver)

http://www.csszengarden.com/?cssfile=http://adjustafresh.com/zen/mozattack.css

http://csszengarden.com/?cssfile=http://bvproject.free.fr/rainy_train/bv.css


I won't promote the use of either (personally I don't care) I just can't stand staring at <td>'s and <tr>'s.

*Yak*

mrruben5
05-30-2005, 12:23 PM
Owned :D

Nightfire
05-30-2005, 12:56 PM
Can ya stop this bickering and just help the original poster? You'll be spamming him with emails of stuff that's not helping him at all

mrruben5
05-30-2005, 02:53 PM
OK Nightfire.

Spankinator what you mean is using an inline frame. You'll have to insert an inline frame with a name, and then use a target on the hyperlinks.

EG


<html>
<body style="margin:0;padding:0;">
<table width="100%" height="100%"><tr><td>

<a href="http://www.google.com" target="content">Google</a>

</td><td>

<iframe name="content" src="yourpage.htm" frameborder="0" width="100%" height="100%">
</iframe>
</td></tr></table>

<p>
Some older browsers don't support iframes. If they don't, the iframe will not be visible.
</p>


</body>
</html>

Spankinator
05-31-2005, 07:33 AM
Well it's been a while since I posted, because of Memorial weekend and all, but anyways. Back on the topic I asked about...

I am going to continue for now using my table layout, which is



<!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en"
xml:lang = "en" dir="ltr">

<head>
<title></title>
<meta http-equiv="content-type"
content="text/html; charset=iso-8859-1" />
</head>

<body>
<table width="100%" border="1">
<colgroup width="15%" />
<colgroup width="85%" />
<tr valign="top" height="75">
<td>
<p>Logo</p>
</td>
<td>
<p>Title</p>
</td>
</tr>
<tr valign="top" height="600">
<td>
Navigation Pane</td>
<td>
<table width="100%" border="1">
<tr valign="top">
<td>
<p>Body Content</p>
</td>
</tr>
</table>
</tr>
</table>
</body>
</html>


Again, this is a basic layout. There are obviously tweaks to be made, but if you use this template for each site you create, the links in the nav pane WILL work and open up in the right side table cell.

Thanks for all the help and replies. Hopefully I'll be able to create sites fluently like most people pretty soon!



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum