How to set border of frameset to 0 in CSS?

Posted on 2006-05-19
Last Modified: 2013-11-19

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?

Question by:AdamJSawyer
    LVL 3

    Expert Comment

    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!


    Author Comment

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

    LVL 14

    Expert Comment

    are you using the correct *frameset* doctype?

    Author Comment

    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.


    Author Comment

    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">

    LVL 9

    Accepted Solution

    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


    Author Comment


    At least I know where I stand now.


    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
     shows up in Outlook, not OWA or on phone 3 45
    Specific format 21 107
    WCAG audit tools 1 39
    Centering a div in html5 5 29
    What is Node.js? Node.js is a server side scripting language much like PHP or ASP but is used to implement the complete package of HTTP webserver and application framework. The difference is that Node.js’s execution engine is asynchronous and event…
    Why do we like using grid based layouts in website design? Let's look at the live examples of websites and compare them to grid based WordPress themes.
    The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
    The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now