tags:

views:

378

answers:

5

i am try to get a div to floating over table so it will be ontop of all the txt?

+2  A: 

Check out z-index (and possibly absolute positioning, although there are other ways to get things to overlap).

T.J. Crowder
A: 
`position: absolute`
Pekka
A: 

Hi

<div id="floatme">Float this over the text</div>

<style>
   #floatme{
       position: absolute;
       top: XXpx;
       left: XXpx;
   }
</style>

Just change the top and left variables.

Jake
Still need `z-index` depending on where it is in the markup compared to the things it will be on top of.
T.J. Crowder
A: 

I would wrap the table in a "positioned" div. I set the div to position:relative so that it won't interrupt the flow of the rest of the documents contents.

<div style="position: relative">
  <table style="width: 500px;">
    <tr>
      <td>Table Text</td>
    </tr>
  </table>

  <div style="position: absolute; top: 0; left: 0; width: 500px; background: green;">
    I am on TOP of the table!
  </div>
</div>
jessegavin
A: 

I agree with TJ - z-index is the way to go - using javascript and css/html will allow you to hide/show this "magic floating box" above the table.

Nascent_Notes