470,641 Members | 1,815 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,641 developers. It's quick & easy.

CSS Frameset Borders

satchmo67
Howdy,

I want to reply to a really old post on this subject. The original poster was battling with the problem of trying to validate a frameset page and use the border attribute. I have been down this very path some time ago and can answer!

Fact is you can't use the border attribute and also validate as a frameset, but you can work around it to achieve the outcome of validating your page and also killing the frame borders. A site I developed some time ago at http://www.mattman.com.au/ does just that.

If you look at the page source you will see that the frameset includes 7 frames, no border attributes (so it validates), but also does not display the borders.

What I did to achieve this was to use a re-framer JavaScript for the separate purpose of ensuring that no pages are shown without the rest of the frameset wrapped around it. From within the source you'll see that the re-framer script sits at http://www.mattman.com.au/reframer2.js, so take a peek. Apart from the JS functionality to re-frame, the script also repeats the frameset tags. But this time I included the border="0" attribute.

So when a JavaScript enabled browser displays this page it also reads the script and follows the border attribute within it. Of course the W3C validator doesn't read JavaScript, so it is happy to validate.

This is a work around, some might say a cheat. But it works. Of course the 10% of users who refuse to enable JavaScript will see the frame borders, but I figure this 10% of users are probably used to missing out on a lot of website functionality as their trade-off.

Now, with all of that said, I want to emphasis that my sample site is a few years old. I've now left frameset pages and moved on to using CSS fixed divs to create the illusion of frames. Much better, and my pages now validate as xhtml 1.1 (Gary Badger as an example).

I've only been a member here for as long as it has taken me to type this, so I hope my views on this are welcome.

Cheers,
Gary.
Aug 15 '06 #1
2 2497
Banfa
9,065 Expert Mod 8TB
All views are welcome, particularly when this informative :D
Aug 15 '06 #2
iam_clint
1,208 Expert 1GB
Yes, i never really work with frames so it was very informative to me. thanks
Aug 15 '06 #3

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

3 posts views Thread by Tim Wallace | last post: by
3 posts views Thread by Jun | last post: by
1 post views Thread by Manu | last post: by
13 posts views Thread by Andrew C. | last post: by
reply views Thread by Rob McLennan - ZETLAND | last post: by
8 posts views Thread by Steel | last post: by
2 posts views Thread by nicstel | last post: by
???
1 post views Thread by Stoney L | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.