Solved

Absolute position inside table

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

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The task A number given should be formatted for easy reading by separating digits into triads. Format must be made inline via JavaScript, i.e., frameworks / functions are not welcome. So let’s take a number like this “12345678.91¿ and format i…
This article will give core knowledge of JavaScript and will head in to your first JavaScript program. I am Durvesh Naik and I am here to deal with this series of JavaScript. I will teach you JavaScript in part wise , as its quite boring to read big…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now