html - Make inside table be as wide as its contents inside an overflowing div -


i have table inside div style table-wrapper:

.table-wrapper {     display: inline-block;     overflow-x: scroll;     width: 800px; } 

as can see want div show horizontal scroll bar table inside can wide should. problem is, table still adjust occupy width of wrapper, rendering scrollbar useless. table style:

.elements-table {     width: 100%; } 

how can table wide should?

when use width:100%, element try match width of parent container, in case 800px.

you'll need set hard or min-width on table have parent .table-wrapper scroll.


Comments

Popular posts from this blog

image - ClassNotFoundException when add a prebuilt apk into system.img in android -

I need to import mysql 5.1 to 5.5? -

Java, Hibernate, MySQL - store UTC date-time -