NetTalk Central

NetTalk Web Server => Web Server - Ask For Help => Topic started by: Alberto on November 08, 2023, 10:15:32 AM

Title: Center a WebBrowse
Post by: Alberto 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
Title: Re: Center a WebBrowse
Post by: Bruce on November 09, 2023, 05:35:29 AM
how is this "not easy"?

have you tested in non-webkit browsers?
Title: Re: Center a WebBrowse
Post by: Alberto 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
Title: Re: Center a WebBrowse
Post by: Bruce 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)
Title: Re: Center a WebBrowse
Post by: Bruce 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