How to center your button

All that relates to Javascript, CSS, HTML, ....
Post Reply
Zim
Posts: 107
Joined: Mon Feb 08, 2021 9:15 pm
Has thanked: 85 times
Been thanked: 46 times

How to center your button

Post by Zim »

Code: [Local Link Removed for Guests]

cls
' buttons using <div align = 'center'>
a$ = ""
a$ = a$ + "<div align='center'>" + button$("pump1", pump1) + "</div><br>"
a$ = a$ + "<div align='center'>" + button$("pump2", pump1) + "</div><br>"
a$ = a$ + "<div align='center'>" + button$("pump3", pump1) + "</div><br>"
a$ = a$ + "<div align='center'>" + button$("pump4", pump1) + "</div><br>"

html a$

' buttons using table simple
a$ = ""
a$ = a$ + "<table align='center'>"
a$ = a$ + "<tr>"
a$ = a$ + "<td>" + button$("pump1", pump1) + "</td>"
a$ = a$ + "</tr><tr>"
a$ = a$ + "<td>" + button$("pump2", pump1) + "</td>"
a$ = a$ + "</tr><tr>"
a$ = a$ + "<td>" + button$("pump3", pump1) + "</td>"
a$ = a$ + "</tr><tr>"
a$ = a$ + "<td>" + button$("pump4", pump1) + "</td>"
a$ = a$ + "</tr><tr>"
a$ = a$ + "</table>"
html a$

' buttons using table multiple
a$ = ""
a$ = a$ + "<table align='center'>"
a$ = a$ + "<tr>"
a$ = a$ + "<td></td>" ' first cell empty
a$ = a$ + "<td>" + button$("pump1", pump1) + "</td>"
a$ = a$ + "<td>" + button$("pump2", pump1) + "</td>"
a$ = a$ + "</tr><tr>"
a$ = a$ + "<td>" + button$("pump3", pump1) + "</td>"
a$ = a$ + "<td>" + button$("pump4", pump1) + "</td>"
a$ = a$ + "<td>" + button$("pump5", pump1) + "</td>"
a$ = a$ + "<td>" + button$("pump6", pump1) + "</td>"
html a$
wait


pump1:
' do whatever you want
return

Thanks cicciocb
Post Reply