1

Topic: To receive width

Hello.
Absolutely )
Through jquery.load I load in the container a file. In a file the type table :input. In some lines.
Input it will then be transformed to a component. With setting of width.
And here is how to learn width of the text? I understand that the width of the text will be  from width of the container where this file is loaded.
But me on the contrary) to receive width of the text and input then to expose normal width of the container. And it would be desirable to learn width of the text when it is displayed in single line.
Chaotically

2

Re: To receive width

I suppose, for determination of width of the text, it it is necessary to place with what that a non-break style in the temporary container (like div) without restrictions on width, and then to receive width of this container and to subtract indents if they are.
About  it is not clear. However, about a file and loading too.

3

Re: To receive width

AndrewVL wrote:

But me on the contrary) to receive width of the text and input then to expose normal width of the container.

Philosophical questions - that are normality and what for it is necessary to you.
Rubber imposition that-whether? Well so set "the fixed" width of columns of the table styles/classes - in percentage.
Type such:

<td style = "max-width: 20 %; min-width: 20 %; width: 20 %;">... </td>
<td class = "fixed-width-20p">... </td>
<style>
.fixed-width-20p {
max-width: 20 %;
min-width: 20 %;
width: 20 %;
}
</style>

4

Re: To receive width

Damirovich wrote:

Philosophical questions - that are normality and what for it is necessary to you.

Is jqxWindow. Something is loaded in it similar.

<div style = "visibility: visible;" id = "d1">
<div style = "overflow: hidden;">
<table style = "table-layout: fixed; border-style: none;">
<td align = "right"> the Name:
</td>
<td align = "left">
<input id = "p_name" type = "text"/>
</td>
</tr>
<tr>
<td align = "right"> the name two:
</td>
<td align = "left">
<div id = "p1_name" type = "text"/>
</td>
</tr>
</table>
</div>
</div>

Further

$("#p_name").jqxDropDownList (.... width: 400...);
$("#p1_name").jqxDropDownList (.... width: 400...);

And here it would be desirable, that jqxWindow to make in the width to equal width d1 Considering that the name two should be displayed in single line

5

Re: To receive width

Well, for example, somehow so:

$("#p_name").jqxDropDownList (.... width: 400...);
$("#p1_name").jqxDropDownList (.... width: 400...);
...
let fontSize = parseInt ($ (' #p1_name ').css (' font-size '));
let textSize = $ (' #p1_name ').text ().length;
$(<jqxWindow>).innerWidth (fontSize * textSize);

Well and to consider indents in styles for all overlying over p1_name elements...