473,803 Members | 3,022 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

synchronizing 2 tables' columns width

abs
Hi everybody.

My problem: there are two tables. Their columns' widths are set by the
content. Do you have any idea how to set the width of the second table's
columns to be the same as width of adequate columns in the first table ?

Best regards,
ABS
Jul 23 '05 #1
2 2258
abs wrote on 06 feb 2005 in comp.lang.javas cript:
My problem: there are two tables. Their columns' widths are set by the
content. Do you have any idea how to set the width of the second
table's columns to be the same as width of adequate columns in the
first table ?


in IE:

<table id=t1 border=1>
<tr><td>qqqqqqq qqqqqqqqqqqqqqq qqqq</td></tr>
</table>
<br><br>

<table id=t2 border=1>
<tr><td>q</td></tr>
</table>
<script >

function g(x){
return document.getEle mentById(x)
}

g("t2").style.w idth = g("t1").offsetW idth

</script>

--
Evertjan.
The Netherlands.
(Replace all crosses with dots in my emailaddress)

Jul 23 '05 #2
abs
Evertjan. wrote: [...]

Big thanks !
ABS
Jul 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
2287
by: Mario T. Lanza | last post by:
Greetings, I've been working on a 3-column layout where the center column is of a fixed width (230px wide). The center column must always be 230px and the columns on the right/left (always the same size as eachother) must always take up the remaining width of the browser. I have been designing for Firefox and IE and routinely viewing the results in both.
57
25531
by: Bing Wu | last post by:
Hi all, I am running a database containing large datasets: frames: 20 thousand rows, coordinates: 170 million row. The database has been implemented with: IBM DB2 v8.1
1
2057
by: Pete Davis | last post by:
I have written a custom databound grid control that we've been using successfully for months, but one of our developers has just run into a problem that I can't figure out. The code for setting it up is as follows: DataSet dataSet = new DataSet( "TestSet" ); DataTable tableParent = dataSet.Tables.Add( "TableParent" ); tableParent.Columns.Add( "ID", typeof( Int32 ) );
4
2483
by: Joe Van Meer | last post by:
Hi, Is the datalist meant for one table or can I use it to display information from 2 different tables? Or should I be looking at a datagrid instead? I began my code and kinda ran into a snag where my last two columns I am displaying are ID fields, one for clientid and the other for empid. What I would really like is to display their actual names instead of the ids.
5
1754
by: Iams | last post by:
What do I have to do to get a column in a table to stay the same size no matter what is in the other tables? I've tried setting the width in px, in percentages, and nothing seems to work; for example, the columns that are colored #cccccc I want to stay the size of the menu control, which doesn't change. However, if the column to the right of it, with the ucGeneral and ucDetails controls, has nothing in it, or something very small, the...
2
1435
by: Griff | last post by:
I've a (classic) ASP web page that has several tables on it that have identical columns (headings). When these tables are displayed they of course have different widths, based upon the amount of text within each column. I have been asked to make all tables have identical column widths. What I thought I would do would be to have some sort of column-width counter that counted the maximum number of characters in column A in all tables,...
8
385
by: Mark VB | last post by:
Hi, I'm trying to create a table with two (equally wide) columns. Except for the first row, which should contain 3 columns with the first and third cell having a fixed width. Something like this: +---------+---------------+---------+ + (fixed) | | (fixed) | +---------+---------------+---------+
32
2733
by: Simon Dean | last post by:
Duh... Not another one... Hopefully simple though, I hate the way *I* (and it might be a CSS trait) can't intermix fixed width divisional elements with a variable auto expanding div??? The great thing I loved with Tables, was being able to say:
15
1733
by: Peter | last post by:
I have the following web page and I am trying to have the Field lables NOT to wrap. It looks fine in a designer but when I run the program in a browser the lables that have a space wrap. How do I prevent this? Also, is there a better way to design an data entry web page without using tables, (it's a realy paint in you know what to do that with tables), but I don't know how to line up the fields any other way. Thank You
0
9564
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10546
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10310
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10068
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9121
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5498
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5627
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3796
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.