How to make the Dom Elements Responsive in Mobile
How to make the Dom Elements Responsive in Mobile
Saritha
Posts: 23Questions: 7Answers: 1
If i am opening this Datatable in mobile Dom elements(l,f,p..etc) are disarranging in my table and these are not look like in desktop.
Please suggest me how to make them responsive when i am opening in mobile device
This discussion has been closed.
Answers
Can you link to a test page showing the issue please (per the forum rules). The DataTables default stylesheet should be responsive.
Allan
Hello Allan,
thanks for your reply.
Please find the attchment.Search,pagination and filters are not aligned properly.
Thanks for the screenshot. As I mentioned, I would need a link to the page showing the issue.
Allan
Allan,
You would need the logon to check this and it is not preferable.
Let me know is there any way if i can share the link.
This the code for reference.
The paging and filtering in your screenshot are all centre aligned. What do you mean by "not aligned properly"? If you want them to be left aligned you need to update the DataTables stylesheet to do that, or have your own override styles.
Allan
Hello,
When i open in desktop Pagination:Alligned to bottom right corner.
Search:Top right Corner
Show Filter:Top left Corner
Excel:Next to the Show filter
Attaching here with image for desktop
I want to keep these in same position in mobile view.
But there isn't space for them to be left and right positioned on the same row when in mobile view. You can see that from your own screenshot, they would overlap.
Allan
Yeah you are right,thanks for the look over it.
So since there is no space it is aligning to bottom.
Is there any way if i can arrange the Show filter and Search box in different rows so that in mobile view it can be still remaining in top right side of the table.
You mean you just want to right align those two elements? Sure, just use CSS to do it:
Obviously wrapped in a suitable responsive CSS @ statement.
Allan