Page 1 of 1

How to activate vertical scroll in HTML object

Posted: Thu Jan 05, 2023 1:34 pm
by yvesf
Hello,

I have an HTML object and I would like to have a vertical scrol when I have reach the bottom of the Html control.
Capture.PNG
Any idea ?

Yves

Re: How to activate vertical scroll in HTML object

Posted: Thu Jan 05, 2023 2:58 pm
by kev1n
To add a vertical scrollbar to a div element, you can use the overflow-y property in CSS.

Here's an example:

Code: Select all

.scrollable-div {
  height: 200px; /* Set a fixed height for the div */
  overflow-y: scroll; /* Add the scrollbar */
}
You can also use auto instead of scroll if you want the scrollbar to appear only when necessary.

Code: Select all

.scrollable-div {
  height: 200px; /* Set a fixed height for the div */
  overflow-y: auto; /* Add the scrollbar only when necessary */
}
You can then apply this class to your div element in your HTML:

Code: Select all

<div class="scrollable-div">
  <!-- Your content goes here -->
</div>
I hope this helps! Let me know if you have any questions.

Re: How to activate vertical scroll in HTML object

Posted: Fri Jan 06, 2023 10:43 am
by yvesf
Thanks Kevin,

Where should I update the css ? and apply the class to my object ?
Many thanks and sorry I am beginner with nubuilder...

Yves

Re: How to activate vertical scroll in HTML object

Posted: Fri Jan 06, 2023 10:47 am
by kev1n
The content of the HTML object must look like this:

Code: Select all

<div class="scrollable-div">
  <!-- Your content goes here -->
</div>
Add the CSS in Form Properties -> Custom Code -> Style

Re: How to activate vertical scroll in HTML object

Posted: Fri Jan 06, 2023 11:30 pm
by yvesf
Hello Kevin,

Tried to do your modifications without success unfortunately.

Behind the HTML control
Capture1.PNG
and behind the custom CSS on the form
Capture2.PNG
The output doesn't show any vertical scrollbar
Capture3.PNG
What is wrong ?
Thanks for your help,

Yves

Re: How to activate vertical scroll in HTML object

Posted: Sat Jan 07, 2023 3:18 am
by yvesf
Solved. It was due to a typo in the nuSetValue behind Custom Field tab (onload event)