javascript - How to determine how many CSS3 columns are actually being displayed (vs. the specified column-count)? -
i have list of tags in box i've specified having multiple columns:
#tags { -webkit-columns: 140px 5; }
result:
the content of list dynamically generated.
when resize browser window, number of columns collapses. e.g.:
using jquery / js / css / etc., how can determine how many columns being displayed @ given time?
unless specified column width-related properties browsers try fit whole number of columns in content area (between left , right padding of element). (contentwidth + columngap)/(columnwidth + columngap)
rounded down give result.
note right padding may set high whole column able fit there - may need adjust computations.
you can directly size of column if have element 100% width inside columns text.
Comments
Post a Comment