/    Sign up×
Community /Pin to ProfileBookmark

Frames in a table

On my page, I use tables to give it a nice blocky appearance. In the main “block” of the table, I want to put a frame, so I can therein display whatever content I see fit.

However, this doesnt seem possible, or Ive missunderstood the correct way to do it.

This is the code I use:

[code=html] <table>
<tr>
<td height=”540″>
<div align=”center”>
<br>

<frame frameborder=”0″ noresize=”1″ src=”home.html” name=”mainframe”>

<br>
</div>
</td>
</tr>
</table>[/code]

Using the firebug addon for firefox, it looks like the frametag is simply removed. Any ideas?

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@FangOct 16.2007 — You are confusing frames with iframes (inline frame). You probably require an iframe.

http://w3schools.com/html/html_frames.asp
Copy linkTweet thisAlerts:
@mizipzorauthorOct 16.2007 — Thanks, did you mean to link here? Or didnt you want to spoonfeed me entirely? ?
Copy linkTweet thisAlerts:
@mizipzorauthorOct 16.2007 — Thanks, that seems to be more what I want. But I want the frame to occupy the entire "block" in the table. I thought I could do this by setting height and width to 100%.

Is there a way to force a frame to occupy all space available, no matter how small the containing page is?

Source as of now:

[code=html] <table>
<tr>
<td height="540">
<div align="center">

<iframe width="100%" height="100%" frameborder="0" src="home.html" name="mainframe" scrolling="auto"/>

</div>
</td>
</tr>
</table>

[/code]
Copy linkTweet thisAlerts:
@FangOct 16.2007 — If it's just an iframe in the cell it will fill the cell. Remove the div, it's redundant; if the iframe has width:100% then there's nothing to center.
Copy linkTweet thisAlerts:
@mizipzorauthorOct 16.2007 — Thanks yet again. I just noticed a wierd thing, my first answer got posted. I was going to reply again with that second question and saw that my first answer wasnt there. I thought some error had occured. Thats why I said "thanks" twice btw. :p

Anyway, I ran into another problem with iframe, after the iframe tag, the last two <table> sections are ignored. Im validating the site right now but I cant see any errors that might cause this. And I found nothing on google that an iframe must be placed at the end of the document.
Copy linkTweet thisAlerts:
@FangOct 16.2007 — Paste the full code or a link
Copy linkTweet thisAlerts:
@mizipzorauthorOct 16.2007 — Ive solved it, if I close the iframe tag like this:

[code=html]<iframe src="foo.html" />[/code]

The problem described above arises. But if I do this:

[code=html]<iframe src="foo.html> </iframe>[/code]

It Works. I dont know why, but the important part is that it works and passes validation.
×

Success!

Help @mizipzor spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.19,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...