[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 986
  • Last Modified:

How to set border of frameset to 0 in CSS?


I'm trying to set the border width of a framset to 0 in CSS, but can't work it out.

Tried {border-width: 0px}

but doesn't work

Can anyone help?

1 Solution
Hi AdamJSawyer,

Do you have to set the border in CSS? Using HTML you can just set the frameborder attribute to 0:

<frameset cols="120,*" frameborder="0">

I believe that most browers do not support the styling of frames.

Hope this helps!

AdamJSawyerAuthor Commented:
Yes I have to use CSS because FRAMEBORDER and BORDER attributes are not supported in the HTML validation.

are you using the correct *frameset* doctype?
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

AdamJSawyerAuthor Commented:
Yes I am, and I am still getting the error. My code for the DOCTYPE was slightly different to that listed at the w3 site, and I have changed it to match, and still get the following error:

 Below are the results of attempting to parse this document with an SGML parser.

   1. Error Line 10 column 31: there is no attribute "BORDER".

      <frameset cols="175,*"  border="0">

      You have used the attribute named above in your document, but the document type you are using does not support that attribute for this element. This error is often caused by incorrect use of the "Strict" document type with a document that uses frames (e.g. you must use the "Transitional" document type to get the "target" attribute), or by using vendor proprietary extensions such as "marginheight" (this is usually fixed by using CSS to achieve the desired effect instead).

      This error may also result if the element itself is not supported in the document type you are using, as an undefined element will have no supported attributes; in this case, see the element-undefined error message for further information.

      How to fix: check the spelling and case of the element and attribute, (Remember XHTML is all lower-case) and/or check that they are both allowed in the chosen document type, and/or use CSS instead of this attribute.

AdamJSawyerAuthor Commented:
Here is the entire file:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
  <title>Brain Lumley Books - Online!</title>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8">      

<frameset cols="175,*"  border="0">
  <frameset rows="139,*" border="0">

    <!-- Top Left Logo -->
    <frame src="TopLeftLogo.html" scrolling="no" marginwidth="0" noresize name="TLLogo">

    <!-- Reviews Panel -->
    <frame src="SidePanel.html" marginheight="10" marginwidth="0" noresize name="SidePanelFrame">


  <frameset rows="75,64,*,70" border="0">

    <!-- Brian Lumley Page Heading -->
    <frame src="LumleyLogo.html" scrolling="no" marginheight="0" marginwidth="10" noresize name="LumLogo">

    <!-- Image List for Book Reviews -->
    <frame src="LumleyImList.html" scrolling="no" marginheight="0" marginwidth="10" noresize name="LumList">

    <!-- Main viewing frame -->
    <frame src="LumleyIntro.html" marginheight="10" marginwidth="20" noresize name="MainFrame">
    <!-- Contact frame -->
    <frame src="LumleyFooter.html" scrolling="no" marginheight="0" noresize name="LumContact">

Hi Adam

You can't make a valid frameset without borders showing in some way.
You can hide the gray borders by using frameborder=0 on your frames but it does not
remove the space taken up by the borders.

The only thing that does excatly what you want is border=0 and that is not a valid
frameset attribute in any Document Type Definition...

In general you should not use frames. Frames give rise to a wide variety of problems
both for general usability and specifically for accessibility by users with disabilities.
Try using alternative HTML technologies like includes.

If for some reason you have no other options than using frames remember to include
the noframes (only in HTML 4.01 Frameset)

<frameset cols="175,*">
       Your browser does not handle frames!

Best, Jakob E

AdamJSawyerAuthor Commented:

At least I know where I stand now.


Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now