SitePoint Sponsor

User Tag List

Results 1 to 2 of 2
  1. #1
    SitePoint Member
    Join Date
    May 2002
    Posts
    2
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Relative layers, 100% table

    hello,

    Can anyone help me out, i need to to have two layers that display links onmouseover in the top right of a 100%width table. I am not sure how this works as I have only done absolute layers(divs) b4. Can anyone advise me on a quick an easy solution to this please, do i make an absolute and put a relative in it???

    Thanks for any help you can give me

  2. #2
    Currently Occupied; Till Sunda Andrew-J2000's Avatar
    Join Date
    Aug 2001
    Location
    London
    Posts
    2,475
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    PHP Code:
    <html>
     <
    head>
      <
    title>blah</title>
      <
    script type="text/javascript">

        var 
    num=0;
        var 
    msgs = new Array();

        
    msgs[num++] = 'msg 0';
        
    msgs[num++] = 'msg 1';
        
    msgs[num++] = 'msg 2';
        
    msgs[num++] = 'msg 3';
        
    msgs[num++] = 'msg 4';
        
    msgs[num++] = 'msg 5';
        
    msgs[num++] = 'msg 6';


        function 
    swap(num)
        {
          
    document.getElementById('Hright').innerHTML=msgs[num];
        }
      
    </script>
     </head>
     <body>
      <table border="1">
       <thead>
        <tr>
         <td width="90%" id="H_left" onmouseover="swap(0)">H left </td>
         <td width="10%" id="Hright" onmouseover="swap(3)">H Right</td>
        </tr>
       </thead>
       <tfoot>
        <tr>
         <td width="90%" id="F_left" onmouseover="swap(2)">L foot</td>
         <td width="10%" id="Fright" onmouseover="swap(5)">R foot</td>
        </tr>
       </tfoot>
       <tbody>
        <tr>
         <td width="90%" id="B_left" onmouseover="swap(1)">B left </td>
         <td width="10%" id="Bright" onmouseover="swap(4)">B right</td>
        </tr>
       </tbody>
      </table>
     </body>
    </html> 
    try this, not exactly sure what you need changeing tho. so just put onmouseover on the thing that you need to change and change

    getElementById('Hright')

    to the id of the thing you need to change.

    thats all


Bookmarks

Posting Permissions

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