Results 1 to 5 of 5

Thread: HTML table problem

  1. #1

    Thread Starter
    Member
    Join Date
    Mar 2002
    Posts
    56

    HTML table problem

    I want to display the dropdownbox and the option buttons at the top of the file. I do not want any space between the top border and my dropdownbox. How can I do this valign="top" doesn't seem to work. whats wrong with my code?

    <html>
    <head>
    <title>Marastats</title>
    <noframes>
    <p>your browser does not support frames</p>
    </noframes>
    <FRAMESET rows="38,*" frameborder="no" border="0" framespacing="0">
    <frame src="buttonframe.html" name="buttonframe" scrolling=no marginheight="0" marginwidth="0">
    <frame src="mainframe.html" name='mainframe'>
    </frameset>
    </head>
    </html>

    <HTML>
    <HEAD>
    <script language="JavaScript">
    function newpage() {
    var f = document.frm1.site.options[document.frm1.site.selectedIndex].value

    if(document.frm1.r1[0].checked){
    f += '1.html'

    }else if(document.frm1.r1[1].checked){
    f += '2.html'
    }

    parent.mainframe.location=f
    }
    </script>
    <TITLE></TITLE>
    </HEAD>
    <BODY>
    <form name="frm1" target="mainframe">
    <TABLE cellspacing="0" cellpadding="0" border="0" valign="top">
    <TR valign="left" valign="top"><TD align="left" valign="top"><select name="site" size="1" onchange="newpage();"
    align="left">
    <option selected>Afdeling....</option>
    <option value='to'>Totaal</option>
    <option value='mar'>Maraboes</option>
    <option value='mam'>Mama's</option>
    <option value='om'>Oma's</option>
    <option value='bes'>Bestuur</option>
    <option value='sja'>Sjaars</option>
    </select></TD>
    <TD align="left" valign="top"><INPUT type=radio name=r1 value="alleen eind" checked>alleen eindscores</input></td>
    <TD align="left" valign="top"><INPUT type=radio name=r1 value="alles">alles</input></td>
    <TD align="left" valign="top">&nbsp;&nbsp;&nbsp;&nbsp</td>

    <TD align="left" valign="top"><a href=uitleg.html target=mainframe>uitleg</a></td>
    <TD align="left" valign="top">&nbsp;&nbsp;&nbsp;&nbsp</td>
    <TD align="left" valign="top"><a href=index.html target="_parent">HOME</a></td>
    </tr></table>
    </form>
    </BODY>
    </HTML>

  2. #2
    scoutt
    Guest
    add this to the body which I take it is a seperate file from the frame doc.

    topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0"

  3. #3
    Black Cat JoshT's Avatar
    Join Date
    Nov 2000
    Location
    WNY, USA
    Posts
    4,032
    Originally posted by scoutt
    add this to the body which I take it is a seperate file from the frame doc.

    topmargin="0" bottommargin="0" leftmargin="0" rightmargin="0" marginheight="0" marginwidth="0"
    FYI, that's a hack to get it to work in older browsers, not valid HTML. You can use CSS "margin: 0px;" on the body tag, but again that won't work in older browsers. So use both, as there's a certain newer browser that's supposed to ignore invalid html.
    Josh
    Get these: Mozilla Opera OpenBSD
    I have books for sale: "MCSD in a Nutshell" and "VB Distributed Exam Cram" - PM me for details. Will also trade for a decent ATX Pentium 2 MB/CPU/RAM combo.

  4. #4
    scoutt
    Guest
    true, but it still works in IE6 and NS6

    and thanks for that tidbit Josh

  5. #5
    Fanatic Member cpradio's Avatar
    Join Date
    Apr 2002
    Posts
    616
    and use padding: 0px, marginwidth: 0px, and marginheight: 0px for NS 4.7

    -Matt
    http://cpradio.net/
    Administrator @ WDForums and a Moderator @ WebXpertz City Forums

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width