Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 422409
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T19:04:43+00:00 2026-05-12T19:04:43+00:00

I know frames are bad. However I have to stick with them a little

  • 0

I know frames are bad. However I have to stick with them a little longer. My problem comes from the non-standard “border” attribute of the “frameset” element:

<frameset border="0">
...
</frameset>

If I don’t use that attribute browsers put a gap between each frame. If I use the attribute, HTML validators throw error about “unsupported attribute”.

Now I hear you saying “use it and ignore the validator”, that’s fine. I think I can live with one validator warning, and browsers seem not too worried about it either 🙂

My question is mostly about HTML trickery. How can I set border to 0 and yet stay browser compatible? Think of this as an exercise for similar problems in the future. For instance I tried:

<frameset onload="this.border='0'">

and it didn’t work.

I tried using stylesheets in inner frames to set “border:0;margin:0;padding:0”, it didn’t work either. Gap seems to come from an unknown source.

I thought of writing in Javascript like:

document.write('<frameset border="0">');

But I have a hunch that it wouldn’t validate anyway.

Can you think of an alternate solution?


Other solutions that didn’t work:

  • @Donut: “frameborder” attribute on either “frame” or “frameset” elements
  • @kangax: frameSetObj.setAttribute(‘border’, 0);
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T19:04:43+00:00Added an answer on May 12, 2026 at 7:04 pm

    According to my tests, these should work :

    For Opera (10) :

    frameSetObj.setAttribute("framespacing", "0");
    

    For IE8 :

    frameSetObj.setAttribute("framespacing", "0");
    //set rows and cols attributes again if the frameset already had them.
    frameSetObj.setAttribute("rows", rows);
    frameSetObj.setAttribute("cols", cols);
    

    For FireFox 3.5 and Chrome 3

    frameSetObj.setAttribute("frameborder", "0");
    //same idea as IE8
    frameSetObj.setAttribute("rows", rows);
    frameSetObj.setAttribute("cols", cols);
    

    To summarize, this code should work on every browser:

    frameSetObj.setAttribute("framespacing", "0");
    frameSetObj.setAttribute("frameborder", "0");
    frameSetObj.setAttribute("rows", rows);
    frameSetObj.setAttribute("cols", cols);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have iframe in the site which acts as an internal browser. I know
I'm working on a practice problem set for C programming, and I've encountered this
I know they are, but my co-worker doesn't believe me. He keeps telling me
I'm doing the following: [self.parentViewController dismissModalViewControllerAnimated:YES] This code fails using the Simulator but works
I need to implement login velocity checking for a web service. The service is
I need to play frame based animations. I tried the UIImageView with animationImages but
I am trying to run a Walk style animation on my main game sprite.
We've got a menu in out web app that uses <a> tags to load
The goal is to 'soften' hyperlinks off to external content slightly by displaying an

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.