Solved

<td><table "expand width"><td> without resizing td width

Posted on 2004-09-28
11
1,684 Views
Last Modified: 2008-01-09
ok. This is a tricky one.
I need to have table:
       1                2          3
|               |     text     |     |
|               | <table             >
|               |     text     |     |
|               |               |     |

problem is that when I use <div style="position:absolute"> the table expands to width corectly, but the height is the problem. The text in that table is behind the table.

Is it possible to force TEXT to be below table and at the same time this would expand TD height?
ps. TABLE height and width are dynamic.
0
Comment
Question by:Povilas
11 Comments
 
LVL 31

Expert Comment

by:seanpowell
ID: 12170569
You'll need to post the code of your page, I'm afraid I don't understand your question at all...

Sean
0
 
LVL 1

Author Comment

by:Povilas
ID: 12171397
the thing is that :
I have 3 table cells
----------------------------
|    1    |     2    |    3   |
----------------------------
if I insert div, which width > cells width, to cell 2 i get this bad thing
----------------------------
|    1    |     div       | 3 |
----------------------------
if I use position: absolute, I get this:
----------------------------
|          | text    |    3   |
|    1    |  div +text | 3 |
|    1    |     2    |    3   |
----------------------------
I need to get this:
----------------------------
|          | text    |    3   |
|    1    |  div         | 3 |
|    1    |  text   |    3   |
----------------------------

In other words I need to expand some table cell without changing original table.
0
 
LVL 16

Expert Comment

by:kiranvj
ID: 12178900

if possible please post the code.......

kiranvj
0
 
LVL 1

Author Comment

by:Povilas
ID: 12180140
<table width="100%">
 <td width="100">some stuff</td> //COLOMN 1
 <td width="300">                        //COLOMN 2
   some text
   <table or div>                            <----------
    <table width=">400">               <----------
       -table data-                           <----------
    </table>                                   <----------  
   some text
  </table>
 </td>
 <td width="100">some stuff</td> //COLOMN 3
</table>

<---------- this part needs to be wider the <td> width, but at the same time shouldn't break the original table's <td> width + "some text" needs to be below, not behind <div>, which means, <td No2> expands to height and not to width.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 19

Accepted Solution

by:
webwoman earned 200 total points
ID: 12182791
What you want is not possible. You can't just make one cell wider.
0
 
LVL 1

Author Comment

by:Povilas
ID: 12183666
Actually, I don't need to make my cell wider, I need to have table in div that is in that cell. I even would like the cell to stay the same. I only need, using div position:absolute, to make my cell higher.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 12186432
>><---------- this part needs to be wider the <td> width, but at the same time shouldn't break the original table's <td> width + "some text" needs to be below, not behind <div>, which means, <td No2> expands to height and not to width.

You can't have a wider cell. And you don't need divs at all, nor do you need absolute positioning. Just put the content in the cell. Unless you have exceptionally long text, it will wrap.
0
 
LVL 1

Author Comment

by:Povilas
ID: 12187687
The problem is that I have huge table in that cell + text before and after that table. The perfect way would be div with asolute position, but this needs some trick to move text after the table.
0
 
LVL 19

Expert Comment

by:webwoman
ID: 12205475
No trick. Put the text before, set as a paragraph, then the table, then the next text. All in one cell.

Or make more cells. Or put each table in a div and float the divs.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Introduction The Google Maps API offers various ways to draw dynamic and static maps.  Using a combination of PHP and JavaScript, you can draw active JavaScript maps that allow pan-and-zoom in the client browser window.  You can also draw "static" …
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
In this tutorial viewers will learn how to embed videos in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <video> tag to insert a video. Define the src as the URL of your video; this is similar to …
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)

910 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

21 Experts available now in Live!

Get 1:1 Help Now