Android Question How to Fix the Heading of a WebView Control while scrolling up ?

beelze69

Active Member
Licensed User
Longtime User
Hi,

How can one scroll the contents of a WebView Control keeping the Heading row (row 0 or row 1) fixed ?
 

nwhitfield

Active Member
Licensed User
Longtime User
You can do this with CSS; make the first line a div (or some other element) of its own, and add the "position:fixed" attribute to the styles. You may also want to change the z-index to make sure that it's at the front, and everything else scrolls behind it. For instance, one one of my sites, we keep the drop-down menus at the top of the page fixed, if the user preferences request it, like this

B4X:
<section class="header u-full-width" id="pageheader" {if $smarty.session.fixmenus == 'y'}style="position:fixed; z-index:100"{/if}>
 
Upvote 0

beelze69

Active Member
Licensed User
Longtime User
You can do this with CSS; make the first line a div (or some other element) of its own, and add the "position:fixed" attribute to the styles. You may also want to change the z-index to make sure that it's at the front, and everything else scrolls behind it. For instance, one one of my sites, we keep the drop-down menus at the top of the page fixed, if the user preferences request it, like this

B4X:
<section class="header u-full-width" id="pageheader" {if $smarty.session.fixmenus == 'y'}style="position:fixed; z-index:100"{/if}>
Thanks a lot
 
Upvote 0
Top