Solved

Absolute position inside table

Posted on 2004-09-11
3
590 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
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

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

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

In this article, we'll look how to sort an Array in JavaScript, including the more advanced techniques of sorting a collection of records either ascending or descending on two or more fields. Basic Sorting of Arrays First, let's look at the …
In my daily work (mainly using ASP.net), I need to write a lot of JavaScript code. One of the most repetitive tasks I do are the jQuery Ajax calls. You know: (CODE) I don't know if for you it's the same, but for me is soooo tedious to write the …
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…

809 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