Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

table and web pages

Status
Not open for further replies.

dorling

Technical User
Mar 25, 2004
80
GB
hi there,

i got the code below which is a simple table but inside the cell i want to include two different web pages. Is there a way of doing this?

thanks in advance

Jonathan D


Code:
<html>
<head>
</head>
<body>
<table>
<tr>
<td width="200" height="200" align="center">web page 1</td>
<td width="200" height="200" align="center">web page 2</td>
</tr>
</table>
</body>
</html>
 
could you please show me some code for this?

thanks in advance

Jonathan D
 
Something like this should do it ...
Code:
<html>
<head>
</head>
<body>
<table>
<tr>
<td width="200" height="200" align="center">
  <iframe src="YourURLforPage1" />
</td>
<td width="200" height="200" align="center">
  <iframe src="YourURLforPage2" />
</td>
</tr>
</table>
</body>
</html>

Cheers,
Mike.

True wisdom is knowing when to RTFM.
 
You could use Server side includes or PHP includes to achieve this much more neatly.
If your host does not support either of these methods then iFrames are a possible but I never use them so I don't know much about them. There must be a reason they aren't used all the time though.

You won't get flamed for asking about frames, but they really are not the best way to do things now the web has developed past where it was in 1995. I don't think they'd help you in this situation anyway.

"I'm making time
 
<iframe height="500" frameborder="0" width="600" src="test.html" />

can i have the height as auto so it is as long as the page that it is inserting or not

thanks in advance

Jonathan D
 
Using height="100%" might do it. What worked for me was style="height:100%;"

Cheers, Mike.
 
iframes aren't part of the XHTML spec

What about this part? or (admittedly going back to HTML4.01) this one?. <iframe>s are perfectly valid in the "Frameset" and "Transitional" flavours of (X)HTML, so that's not the reason to avoid them.

They can be problematic in terms of accessibility - screen readers could be confused by them - and may also hurt your search engine results. Use them sparingly and with care.



-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
ChrisHunt,

I agree totally. Since moving away from frames (years ago) I've only used one iframe, but that was quite recently. And then only because I needed to include output from a third-party application on my page, and that output was a fully formed HTML page in its own right over which I have no control.

As for search engine results ... the advantage with writing intranet (and extranet) stuff is that you don't have to give them any consideration at all :)

Cheers, Mike.
 
i try using height=100% but this did not work how did you do it with a style?

thanks in advance

Jonathan D
 
Code:
<iframe src="wherever/your/file/is" style="width: 100%; height: 100%;" />
This produced an iframe the same size as the browser viewport.

Cheers, Mike.
 
this as not work!!! but do u mean by same size as the browser viewport

thanks in advance

Jonathan D
 
I wonder why that wouldn't work for you. It was fine for me with IE6, and with
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
	"[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
The viewport is the big lump of window where your stuff gets displayed (ie the bit that's NOT the title bar, menubar, address bar, scrollbars,status bar, etc). And the iframe resizes if you resize your browser window.

Cheers, Mike.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top