Go Premium for a chance to win a PS4. Enter to Win

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 597
  • Last Modified:

Absolute position inside table

Hi Experts,

I have an image, a textbox and a table inside a table.
I want to position those 3 controls absolute inside the table.

Is it possible ?
How can I do ?

Thanks in advance for your answers.
0
noulouk
Asked:
noulouk
3 Solutions
 
davidlars99Commented:
you do something like this

document.getElementByid("put_control_id_here").style.position="absolute";


they no longer be part of the table which they belong to, you will have 3 independent objects. what are you trying to do anyway..?
0
 
devicCommented:
hi noulouk,

here an example:
=============================
<html>
<body bgcolor=ffffff>
<table align=center style="position:relative" width=300 height=300 cellspacing=0 cellpadding=0 border=1 bgcolor=#eeeeee>
      <td>
      <img style="position:absolute;left:0px;top:0px;" src=http://oldlook.experts-exchange.com/images/logoWhiteSmall.gif>
      <input style="position:absolute;left:10px;top:10px;">
            <table style="position:absolute;left:20px;top:20px;" width=100 height=100  cellspacing=0 cellpadding=0 border=0 bgcolor=red>
                  <td>my table</td>
            </table>
      </td>
</table>
</body>
</html>
0
 
ZvonkoSystems architectCommented:
This is the same as devic's example. Only slightly more relative absolute :-)

<html>
<body bgcolor=ffffff>
<table align=center width=300 height=300 cellspacing=0 cellpadding=0 border=1 bgcolor=#eeeeee>
     <tr>
     <td width=70>Some Text</td><td style="position:relative" >
     <img style="position:absolute;left:0px;top:0px;" src=http://oldlook.experts-exchange.com/images/logoWhiteSmall.gif>
     <input style="position:absolute;left:10px;top:10px;">
          <table style="position:absolute;left:20px;top:20px;" width=100 height=100  cellspacing=0 cellpadding=0 border=0 bgcolor=red>
               <td>my table</td>
          </table>
     </td>
     </tr>
</table>
</body>
</html>


0

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

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