Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #31393
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2016-09-17 04:45 -0700 |
| References | <3d7fdf4b-ac1c-49e0-815d-8bd26d5b1f91@googlegroups.com> <XnsA6866E981898eejj99@194.109.6.166> |
| Message-ID | <2fc26c4d-7513-4b09-acbf-b046cb11fc71@googlegroups.com> (permalink) |
| Subject | Re: For 2 dynamically generated TD |
| From | justaguy <lichunshen84@gmail.com> |
Ok, here's the code.
// creating row and creating all cells
// creates a table row
var newrow = document.createElement("tr");
newrow.setAttribute('style','td {padding: 10px}');
// cell 1
var cell = document.createElement("td");
cell.colSpan = "2";
// cell.setAttribute('style','padding: 10px');
var cellText = document.createElement('input');
cellText.type = 'text';
cellText.id = 'fLabel';
cellText.name = 'fLabel';
cellText.size = "20";
cell.appendChild(cellText);
newrow.appendChild(cell);
// cell 2
var cell = document.createElement("td");
cell.colSpan = "3";
var cellText = document.createElement('input');
cellText.type = 'text';
cellText.id = 'fValue';
cellText.name = 'fValue';
cellText.size = "80";
cell.appendChild(cellText);
newrow.appendChild(cell);
// code to append the new TR to table
// ...
Additionally, the page is complex, it has tons of other stuff, tons of dynamically generated elements before and after. thanks
On Saturday, September 17, 2016 at 4:52:41 AM UTC-4, Evertjan. wrote:
> justaguy <.com> wrote on 17 Sep 2016 in
> comp.lang.javascript:
>
> > How to set the first TD left aligned and
> > the second TD left aligned to the first TD?
>
> 'left aligned', imho,
> is an internal effect of text [and other inline elements]
> in a container, like in a <td>.
>
> You better give a minimalisitc working example.
>
> --
> Evertjan.
> The Netherlands.
> (Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-16 18:58 -0700
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-17 10:52 +0200
Re: For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-17 04:45 -0700
Re: For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-17 04:48 -0700
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-17 14:04 +0200
Re: For 2 dynamically generated TD justaguy <lichunshen84@gmail.com> - 2016-09-17 06:03 -0700
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-17 13:56 +0200
Re: For 2 dynamically generated TD Dr J R Stockton <reply1600@merlyn.demon.co.uk.invalid> - 2016-09-18 21:04 +0100
Re: For 2 dynamically generated TD "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2016-09-19 10:26 +0200
csiph-web