Solved

Absolute position inside table

Posted on 2004-09-11
3
595 Views
Last Modified: 2008-02-01
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
Comment
Question by:noulouk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 13

Assisted Solution

by:davidlars99
davidlars99 earned 300 total points
ID: 12036735
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
 
LVL 25

Assisted Solution

by:devic
devic earned 100 total points
ID: 12036941
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
 
LVL 63

Accepted Solution

by:
Zvonko earned 100 total points
ID: 12037607
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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Article by: DanRollins
This article describes a JavaScript program that creates a maze made of hexagonal cells.  In Part 2 (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/A_7850-Hex-Maze-Part-2.html), we'll extend the program by adding a depth-…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

617 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