Need an Overview of Possibilities for multicolumn programming
From source1 and source2 i gather that IE9 will NOT support multi-column css3!! Since it is still the most popular browser (another thing i cannot understand), i am left but no other choice than to use Programming Power
to make multi-columns work.
Now, I use three divs that float to left, and which are manually filled with text. Please don't laugh i know its stupid! But I would wish to not to have to worry about the columns and just have a one piece of (un-interrupted) text which all goes into only 1 div, and then have a program smart enough to split it up into X equally wide columns
.
Question: before i start reinvent the wheel, what methods of programming power have you known that tackle this elegantly? Please suggest your best working multi-column layout sources so I can evaluate which option is the best (I will update the below table).
Exploring all possibilities 2011 and further, to enable multi column text user experience:
Language Author SourceCodeUsage WorksOnAllMajorBrowser?
=================================================================================
html manual labour put text manually in separate left-floating divs "Y"
// Upside: control! Downside: few changes necessitates to reflow 3 divs manually!
CSS3 w3c css3.info/preview/multi-column-layout/ "N"
// {-moz-column-count: 3; -webkit-column-count: 3; } Thats all!
javascript a list apart will add url soon ?
//
php ? ? 开发者_C百科 ?
//
I faced this problem recently with a project at work.
- I first turned to CSS finding only minor support.
- I then considered using JavaScript to equally balance the columns.
- But I wanted a robust, supported solution and finally whet with server side/manual columns.
I needed two columns and was storing each column separately in a database. In your case I can only suggest simply taking the single body of text and splitting it in half based upon the word count.
However a more accurate approach might be to find the half way point based upon characters and then put the next word at the start of the next column (assuming two columns). This way the columns may be more evenly balanced.
精彩评论