Here's a question I haven't found an adequate answer for through a couple hours of searching.

I have a client who wants a very horizontally-constricted page layout, similar to the Hemingway Wordpress theme (here's the theme, for reference) - with blog entries, etc. Now imagine that one of the blog entries is quite long, and instead of changing the div height, I wanted to take the text from the blog entry and flow it through multiple divs horizontally.

I'm imagining that my only recourse is going to be to set some arbitrary character count and to slice up the HTML of the blog entry (which is coming from a Wordpress backend) into chunks with Javascript/jQuery and assign each chunk to a div.

But is there a more elegant solution?

2 answers

2
points

CSS 3 has a solution but seems to work only for webkit and firefox browsers. You can use modernizr to create graceful degradation for other browsers.

Answered about 7 years ago by Divya Manian
0
points

If the content is coming from a WordPress theme then you could use some PHP in the theme to split up the content across the divs. This way you won't have to rely on the users having JavaScipt turned on and it might load the page slightly faster.

Answered about 7 years ago by Simon Boak