I need to display terms and conditions on my website without using a text field or taking up the entire page. Instead, I want to show the text in a specific area with only a vertical scroll bar for users to navigate through the content.
Here is the current code I am using:
<div style="width:10;height:10;overflow:scroll" >
text text text text text text text text text
text text text text text text text text text
text text text text text text text text text
text text text text text text text text text
text text text text text text text text text
text text text text text text text text text
text text text text text text text text text
text text text text text text text text text
</div>
There are two issues with this approach:
- The width and height of the div element do not adjust to fit all the text properly.
- A horizontal scroll bar appears when it should not be visible.