HTML & CSS
Okay, so I assumed floats would just casually fill in space both vertically and horizontally based on the content around it. I obviously don't understand how it works.
If you visit the site above (I am using Chrome), the floated sections are not responding how I would like vertically. So when you have two or three paragraphs horizontally, the 4th is appearing at the height of the largest paragraph in the first three that were floated. I'd prefer the 4th move up vertically to be almost immediately under the first paragraph.
I remembered that Pinterest does this and so I went there for "inspiration" only to be completely deceived. They are positioning each box with absolute left and top, and I'm sorry, but that is not a solution.
Anyone know how to accomplish this? (below is the CSS styles being implemented for this particular page)
div.pageContainer div.pageContent div.pageContentText div.singlecolumn blockquote
div.pageContainer div.pageContent div.pageContentText div.singlecolumn blockquote p:before
div.pageContainer div.pageContent div.pageContentText div.singlecolumn blockquote p:after
div.pageContainer div.pageContent div.pageContentText div.singlecolumn blockquote p
padding: .5em 2em .5em 2em;
div.pageContainer div.pageContent div.pageContentText div.singlecolumn blockquote cite
padding: 0 2.5em .5em .5em;
Yeah, floats don't quite work like that. The only straightforward way to do this with current CSS is to create three floated div containers that represent three columns, and then manually arrange the articles that way inside each column.
That saddens me. Guess I'll just try and come up with a different way of showcasing the data.
I really wished CSS could handle this...
Is the content dynamically created? If not, it's easy to do what you want, as I described above.
In the end, yes, it will be dynamically created. Right now it is hard coded for simple proof of concept
Ah, OK. To be honest, though, I don't find it easy to read text in columns. It makes me tend to ignore the text. So even though it seems cool to be able to do it this way, it may be for the best if it isn't easy to do.
This topic is now closed. New replies are no longer allowed.