This question has been flagged
1 Reply
4478 Views

I want to know how make sticky this alert at when doing scroll, using some javascript or css code, I need make that alert to remain fixed while I scroll, exactly when the top of the div.alert meets the header

Thanks for all.

Avatar
Discard
Best Answer

here is an example

<div class="alert alert-info" role="alert" style="margin-bottom:0px;" attrs="{'invisible': [('has_outstanding','=',False)]}">
You have <bold><a class="alert-link" href="#outstanding" role="button">outstanding debits</a></bold> for this supplier. You can allocate them to mark this bill as paid.
</div>

so here just make your conditions or keep it as null in the attrs attribute, but use the same div class and role



Avatar
Discard
Author

Hi Hilar,

thanks for answer, but what I need is for that alert to remain fixed while I scroll, exactly when the top of the div.alert meets the header

thanks.

I see, then I think you can add a new class write some CSS styles for that