Led$ alignment

Recurrent H/W and software problems
Post Reply
User avatar
Electroguard
Posts: 1094
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 373 times
Been thanked: 393 times

Led$ alignment

Post by Electroguard »

align.jpg

Anyone know how to make an Led$ horizontally align with the other items in a table ?

Code: [Local Link Removed for Guests]

led1=0: led2=0
cls
autorefresh 1000
a$=a$ + "<table>"
a$=a$ + "<tr><td>" + "1" + "</td><td>" + Led$(led1) + "</td><td>" + button$("Toggle",toggle1) + "</td></tr>"
a$=a$ + "<tr><td>" + "2" + "</td><td>" + Led$(led2) + "</td><td>" + button$("Toggle",toggle2) + "</td></tr>"
a$=a$ + "</table>"
html a$
wait

toggle1:
led1=1-led1
return

toggle2:
led2=1-led2
return
You do not have the required permissions to view the files attached to this post.
lyizb
Posts: 312
Joined: Fri Feb 12, 2021 8:23 pm
Has thanked: 163 times
Been thanked: 117 times

Re: Led$ alignment

Post by lyizb »

Do you mean as with the /tr removed from the end of the first line and tr removed from the beginning of the following line?
image.png
You do not have the required permissions to view the files attached to this post.
User avatar
Electroguard
Posts: 1094
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 373 times
Been thanked: 393 times

Re: Led$ alignment

Post by Electroguard »

No lyizb, I could easily put them all on the same line without using a table.
I want the horizontal center line of the led$ components to be roughly level with the center line of the other items of the line.

align2.jpg

If the other items are likened to people sat on a line of chairs, the led$ looks like a sagging bum in a collapsing deckchair in their midst.
I expect it must be possible to 'lift' it up somehow, but none of the css style options I've tried have made any difference.
You do not have the required permissions to view the files attached to this post.
User avatar
cicciocb
Site Admin
Posts: 3258
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 650 times
Been thanked: 2291 times
Contact:

Re: Led$ alignment

Post by cicciocb »

Try this:

Code: [Local Link Removed for Guests]

led1=0: led2=0
cls
autorefresh 1000
a$=a$ + "<table>"
a$=a$ + "<tr style='vertical-align:baseline'><td>" + "1" + "</td><td>" + Led$(led1) + "</td><td>" + button$("Toggle",toggle1) + "</td></tr>"
a$=a$ + "<tr style='vertical-align:baseline'><td>" + "2" + "</td><td>" + Led$(led2) + "</td><td>" + button$("Toggle",toggle2) + "</td></tr>"
a$=a$ + "</table>"
html a$
wait

toggle1:
led1=1-led1
return

toggle2:
led2=1-led2
return

User avatar
Electroguard
Posts: 1094
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 373 times
Been thanked: 393 times

Re: Led$ alignment

Post by Electroguard »

Lovely, thank you very much... I couldn't have guessed that in a hundred years.
User avatar
Electroguard
Posts: 1094
Joined: Mon Feb 08, 2021 6:22 pm
Has thanked: 373 times
Been thanked: 393 times

Re: Led$ alignment

Post by Electroguard »

So much better...
align3.jpg
You do not have the required permissions to view the files attached to this post.
User avatar
cicciocb
Site Admin
Posts: 3258
Joined: Mon Feb 03, 2020 1:15 pm
Location: Toulouse
Has thanked: 650 times
Been thanked: 2291 times
Contact:

Re: Led$ alignment

Post by cicciocb »

:D
Post Reply