<div class="ui-datatable-scrollable-view" style="
width: 100%;
position: relative;
">
<div class="ui-widget-header ui-datatable-scrollable-header" style="position:fixed;top:50px">
</div>
</div>
I am facing an issue with a div element that is supposed to stick to the top of the page. I have applied CSS styles as shown below:
width: 100%;
position: fixed;
z-index: 2;
However, the element is not taking up the full width as intended.
I have tried various approaches to resolve this problem. One attempt was setting the parent div's position as relative, but it did not yield the desired outcome;
It seems like the element is inheriting the width from the screen size. I attempted to manually set a fixed width to match the required size, but encountered issues when the screen size changed. Ideally, I want the element to adapt its width based on its parent container.