Using tables instead of iframe?

All about creating websites!
Post Reply
User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Using tables instead of iframe?

Post by ayu »

Ok so I've read some about using tables instead of iframes, and I know b_b mentioned it before in the IRC.

So, how do I use tables instead of iframes? and why is it better?

If anyone could give any examples and explanations I would highly appreciate it =)
"The best place to hide a tree, is in a forest"

User avatar
floodhound2
∑lectronic counselor
∑lectronic counselor
Posts: 2117
Joined: 03 Sep 2006, 16:00
17
Location: 127.0.0.1
Contact:

Post by floodhound2 »

Well in html it is simple just look at the code below

Code: Select all


<table border="1" width="100%" id="table1">
	<tr>
		<td>text here 1</td>
	</tr>
	<tr>
		<td>text here 2</td>
	</tr>
</table>

table border="1" = signifies thickness of border
width="100% = how wide the table extends on the web page

This should get you started.
₣£ΘΘĐĦΘŮŇĐ

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

yes.... but how do I use them instead of iframes? =P
"The best place to hide a tree, is in a forest"

User avatar
maboroshi
Dr. Mab
Dr. Mab
Posts: 1624
Joined: 28 Aug 2005, 16:00
18

You can't

Post by maboroshi »

You can't use Tables instead of iframes :-p in that sense

look into the object tag and div tags for replacing iframes

Anyway ttyl

I like web 2.0 much cleaner to use css then tables :-)

G-Brain
Fame ! Where are the chicks?!
Fame ! Where are the chicks?!
Posts: 467
Joined: 08 Nov 2007, 17:00
16
Location: NL

Post by G-Brain »

http://www.mattheerema.com/archive/exac ... frames-bad

That's one of them, I'm sure you could Google for more inspirational blog posts.

For the how-to:

Suppose you have your site split up in frames with a menu frame on the left and the rest of the page on the right. With tables, you'd make two columns, one for the menu, and one for the rest of the page. Come on, seriously, how hard was that? Are you joking? Are you on drugs?

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

The principle is not the issue here, also I am not using frames, I'm using Iframes, so the site is not cut of in two pieces like you suggested G-Brain.

Also I read that the object tag and div tag does not have the same functionalities as the iframe tag, and also the object tag is bugged in IE6 : /


My webdesign education has a large hole in it since the books we used were old as hell and suggested that we should use regular frames to build our pages.

Now, suck-o for example, when it changes modules, for example when I browse through the modules such as forum and home, how does that work then? isn't there something there with an iframe'ish function?

Or does it use DIV to target pages ?
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

well, it's not the tables itself that can be used as iframe replacement, it's the tables plus PHP...take a look here, I think it'll make it a little more clear:
http://www.garnetchaney.com/how_to_use_ ... ames.shtml

and why better not using frames? 2 reasons, 1st one is that textbased browsers like Lynx don't support frames, so the content is simply not available...of course not many people use such browsers anymore, so the main reason is that frames are bad for SEO. most spiders don't handle frames, once they hit a frame-tag they simply stop there because they label it as off-site content...which makes kinda sense, imagine you would put an iframe with google.com on the site, this would mean your site has all the content google has... :lol:

oh, and btw, I had that much trouble with web dev and IE6 that I don't care about it anymore, IE7 is less crappy (which don't means it is good)....if someone is still using that outdated piece of crap name IE6 it's his problem, not mine...:))

oh, and better luck next time with your next reply g-brain, sometimes stuff is not THAT simple... 8)

User avatar
ayu
Staff
Staff
Posts: 8109
Joined: 27 Aug 2005, 16:00
18
Contact:

Post by ayu »

Thanks for your answers guys ^^

And I read the tut b_b and I understand the principle of it, just gotta figure out how to use it on my page =/


Edit: ok so I am still having some slight problems with this....

From what I can see on this tutorial that b_b linked, I don't HAVE to use tables, or? =/ and what if the contents of the page is to long? how do I get a scroll? =P

I mean, at the moment 90% of my site is loaded with div's, wouldn't itbe possible to have the content in a div? and then maybe add a scroll somehow or something? (I will google around for the scroll issue, but further answers to this would be appreciated ^^) ...


Edit: ah, found an answer to the "scroll" issue

http://www.domedia.org/oveklykken/css-div-scroll.php

But, a few questions remain unanswered above, also I would love to know if phpnuke uses a similar way of browsing as that tutorial (the one that b_b sent)
"The best place to hide a tree, is in a forest"

User avatar
bad_brain
Site Owner
Site Owner
Posts: 11636
Joined: 06 Apr 2005, 16:00
19
Location: In your eye floaters.
Contact:

Post by bad_brain »

you know where you can get the source files, feel free to dl them... :wink:
but I think it uses div-tags (not 100% sure tho).... :-k

User avatar
Ghosted
forum buddy
forum buddy
Posts: 16
Joined: 23 Jun 2008, 16:00
15

Post by Ghosted »

If you are standards compliant tables are depreciated, you should use div's instead(at least that's what people always tell me when I ask if I can use tables for something)

Post Reply