NetTalk Central

Author Topic: Center a WebBrowse  (Read 3092 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Center a WebBrowse
« on: November 08, 2023, 10:15:32 AM »
Hi, to center a WebBrowse, his locator and buttons, I need to add the following css code:
(pic attached)

div#browsetasas_div {
    text-align: -webkit-center;
}
div#browsetasas_table_div {
    text-align: -webkit-center;
}
div#browsetasas_nav_b {
    place-content: center;
}
div#browsetasas_update_b_div {
    place-content: center;
}

Is there any other easy way?

Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Center a WebBrowse
« Reply #1 on: November 09, 2023, 05:35:29 AM »
how is this "not easy"?

have you tested in non-webkit browsers?

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Re: Center a WebBrowse
« Reply #2 on: November 09, 2023, 06:29:07 AM »
I mean, it may be easiest if we have a check in the template to "center the WebBrowse" or "make all the page centered"

Regarding non-webkit browsers, is there anyone? any sugestion to test?

Thanks
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Center a WebBrowse
« Reply #3 on: November 09, 2023, 08:49:11 PM »
there are 3 big engines;
a) web-kit (basically safari)
b) blink (originally based on web-kit, but now diverges. Used in Chrome and Edge).
c) ghekko (used in Firefox)

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Center a WebBrowse
« Reply #4 on: November 09, 2023, 08:51:24 PM »
I mean, it may be easiest if we have a check in the template to "center the WebBrowse" or "make all the page centered"


If you want it applied to "all browses" then you just use a more generic CSS selector.
(hint, you'll quickly discover why this isn't a good idea.)

Setting it as a check-box in the template means that to change it you need to recompile the program. Whereas by setting it in CSS you can fiddle all you like now, and later (when you discover you don't like this "feature" after all.)

Bruce