Markup: Valid borderless frameset impossible ?

started by Zajnee on Nov 11, 2004 — RSS Feed

Joe Gillespie Joe Gillespie
Posts: 528

Hi,

I am trying to make a borderless frameset that is legal HTML 4.01 (see http://www.w3.org/TR/html401/present/frames.html#h-16.2.1) - that seems impossible, since the FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" are not allowed...

Tried styling my way out of the problem but so far without any luck.

Any ideas or suggestions ?

--Zajnee

Edit: It should render correctly in both IE and Mozilla

Joe Gillespie Joe Gillespie
Posts: 528

Zajnee said:
Hi,

I am trying to make a borderless frameset that is legal HTML 4.01 (see http://www.w3.org/TR/html401/present/frames.html#h-16.2.1) - that seems impossible, since the FRAMEBORDER="0" FRAMESPACING="0" BORDER="0" are not allowed...

Tried styling my way out of the problem but so far without any luck.

Any ideas or suggestions ?

--Zajnee

Edit: It should render correctly in both IE and Mozilla



I did this in BBEDit and it validates fine.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
       "http://www.w3.org/TR/html4/frameset.dtd">
<html lang="en">
<head>
     <meta http-equiv="content-type" content="text/html; charset=iso-8859-1">
     <title>Untitled</title>
</head>
<frameset>
<frame src="index.htm" marginheight="0" marginwidth="0" scrolling="auto" frameborder="0">
</frameset>
</html>


However, frames are generally frowned upon these days. There are very few good reasons to use frames that can't be done better with CSS.

Joe Gillespie Joe Gillespie
Posts: 528

Hi Forum Admin,

Thank you for a quick reply, but I did not do a good job explaining what I am after... so I uploaded a demonstration of my problem

http://www.dansknetdesign.dk/liste_frame.html

All valid HTML and therefore with a white line between the frames...  this one is NOT valid :

http://www.dansknetdesign.dk/liste_frame2.html

...but it renders perfectly - sigh !

And I do have a good reason for wanting to use frames : I will preload some pages in hidden frames (frames with 0 height) and thereby be able to show them instantly when the user requests them (and preload another page in the frame they left...)

I'll send you a link to a demonstration, once I have one ready - valid HTML or not.

--Zajnee

Baxter Baxter
Posts: 157

Well, the simple answer is to put a stylesheet rule in:
frameset {border:0}

That should do it.


But here's the better way to do it: Preload the content into hidden divs, then change the visibility to visible (or or display to block, as the case may be) on click. Let's say your blocks are called div1, div2 and div3. In the style sheet, you'll have something like:
#div1, #div2, #div3 {display:none;}

then, down in the code, you'd have some kind of actuator that onclick would set div1 to display:block

whatever link, image or whatever controls the display, add this:
onclick="document.getElementById('div1').style.display = 'block'"

Notice that one says div1... you would need to change appropriately.

Joe Gillespie Joe Gillespie
Posts: 528

Hi Baxter,

I tried it... it's at http://www.dansknetdesign.dk/liste_frame3.html as you can see there is no change - I think I tried that alreay, but I tried so many things I started forgetting what I have tried

I just added
<style>frameset {border:15 px;} </style>
in the header - that is what you meant, right ?

About using DIV's instead of FRAMES, well I would love to, but preloading the NEXT div would be impossible, right ?

Let me explain what i am going for her :

I want to show a list of data - let's say a search result from a search engine. I will show 20 results per page.

If the search returns 276 results I end up with 14 pages.

1. I load the first page (and show it) and preload page 2 and 3.

2. When the user clicks next page I instantly shows page 2 (nothing else happens).

3. When the user clicks next page again I instantly shows page 3 and preloads page 4 in the frame where page 1 was... this is the catch, I don't think I can load contents into a div without submitting the whole page, right ?

I never looked into inline frames... not really sure I like the concept, but that might do it.

--Zajnee

Ps. I am going offline for some hours now (shiver), thanks for some quick replys !

Baxter Baxter
Posts: 157

well, first your syntax is wrong. In the head, put:
<style type="text/css">
  frameset {border:0;
/* just for fun, throw in: */
  margin:0;
}
</style>

You want no border, so why put 15px?

" About using DIV's instead of FRAMES, well I would love to, but preloading the NEXT div would be impossible, right ? "

It's going to load regardless of whether it's shown or not.

Patrick Steve Patrick Steve
Posts: 1

IF you want no border then use the color of border same as the color of background. In this way border will not appear.

70-270 SY0-201

Maskodok Eko Maskodok Eko
Posts: 171

TOP SEO | Jasa SEO Profesional

TOP SEO | Jasa SEO Profesional RajaPoker88.com Agen Texas Poker Dan Domino Online Indonesia Terpercaya IDRPoker.COM Agen Texas Poker dan Domino Online Indonesia Terpercaya POKERSTAR88.com Agen Texas Poker Dan Domino Online Indonesia Terpercaya D

You must login to reply