By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,487 Members | 1,090 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,487 IT Pros & Developers. It's quick & easy.

How to control flow of dynamic content with CSS?

P: n/a
Hello all. I have been given mock-ups (in static HTML) of some pages
for a site I am working on. The client would like these pages to look
exactly as they do now. The problem is that the content is dynamic, it
comes from a database.

My question -- with CSS (because with HTML tables I don't think it's
possible) how can I make my text "flow" in two columns? eg. If there
are 100 lines of content, I would like 50 to be in the 1st column, and
50 in the other. If there are 200, 100 / 100. You get the idea.

I'll just bet it's simple, and yet I can't find the answer ...

Many thanks!
syg
Jul 20 '05 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Robert Bowen wrote:
My question -- with CSS (because with HTML tables I don't think it's
possible) how can I make my text "flow" in two columns? eg. If there
are 100 lines of content, I would like 50 to be in the 1st column, and
50 in the other. If there are 200, 100 / 100. You get the idea.

I'll just bet it's simple


No, it is not. There is no automatic column flow control in CSS now. Why
should it be?
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2

P: n/a
Johannes Koch <ko**@w3development.de> wrote:
Robert Bowen wrote:
My question -- with CSS (because with HTML tables I don't think it's
possible) how can I make my text "flow" in two columns? eg. If there
are 100 lines of content, I would like 50 to be in the 1st column, and
50 in the other. If there are 200, 100 / 100. You get the idea. I'll just bet it's simple

No, it is not.
I wouldn't think so, either. Sounds like server side programming,
rather. With xslt I supposed you could use count and keep a recursive
counter to half of that, and then break to new <td> or whatever,
assuming you don't want to group subcategories or blocks.

There is no automatic column flow control in CSS now. Why
should it be?


Float is kind of like that. And NN used to have <multicol>. It seems
the logical thing, either for proprietary tags or some future CSS.
Styles are supposed to be about the presentation side and appearance,
after all, positioning, box models and all that? Having text processor
column support, as it were, seems very consistent with that. And I
mean if NN could support multicol, with gutter widths, as far back as
NN 3 in the mid 90s, it's not like it can't be done. CSS3 specifies
that options be applied to boxes in the case of page breaks, for ex.

Jul 20 '05 #3

P: n/a
Robert Bowen wrote:
I have been given mock-ups (in static HTML) of some pages for a site
I am working on. The client would like these pages to look exactly as
they do now.
So the pages must appear "exactly as they do now" in IE, Opera, Lynx
(that'll be hard), and HPR (that'll be even harder)?
The problem is that the content is dynamic, it comes from a database.
The problem is an unrealistic demand by the client. That the content is
dynamic does not affect its presentation.
how can I make my text "flow" in two columns?

I'll just bet it's simple


How much are you willing to bet? ;-) Newspaper styles columns are too
difficult to even attempt if you ask me. There is a column flow thingy
proposed for css 3, but it'll be years before that proposal is
supported, and who knows if columns will survive to the final
recommendation?

--
Brian (remove "invalid" from my address to email me)
http://www.tsmchughs.com/
Jul 20 '05 #4

P: n/a

"Mark Johnson" <10*******@compuserve.com> wrote in message
news:05********************************@4ax.com...
Johannes Koch <ko**@w3development.de> wrote:
Robert Bowen wrote:
My question -- with CSS (because with HTML tables I don't think it's
possible) how can I make my text "flow" in two columns? eg. If there
are 100 lines of content, I would like 50 to be in the 1st column, and
50 in the other. If there are 200, 100 / 100. You get the idea. I'll just bet it's simple

No, it is not.


I wouldn't think so, either. Sounds like server side programming,
rather. With xslt I supposed you could use count and keep a recursive
counter to half of that, and then break to new <td> or whatever,
assuming you don't want to group subcategories or blocks.


The server doesn't know where the lines are going to break in the client, so
it has nothing to count.

There is no automatic column flow control in CSS now. Why
should it be?
Float is kind of like that.


Not at all. There is no flow from one block to another.
And NN used to have <multicol>. It seems
the logical thing, either for proprietary tags or some future CSS.
Styles are supposed to be about the presentation side and appearance,
after all, positioning, box models and all that? Having text processor
column support, as it were, seems very consistent with that. And I
mean if NN could support multicol, with gutter widths, as far back as
NN 3 in the mid 90s, it's not like it can't be done. CSS3 specifies
that options be applied to boxes in the case of page breaks, for ex.


Jul 20 '05 #5

P: n/a

"Johannes Koch" <ko**@w3development.de> wrote in message
news:2g************@uni-berlin.de...
Robert Bowen wrote:
My question -- with CSS (because with HTML tables I don't think it's
possible) how can I make my text "flow" in two columns? eg. If there
are 100 lines of content, I would like 50 to be in the 1st column, and
50 in the other. If there are 200, 100 / 100. You get the idea.

I'll just bet it's simple


No, it is not. There is no automatic column flow control in CSS now. Why
should it be?


Because, while the benefits of multicolumn displays on the screen are
unclear to me, CSS3 also contains many features applicable specifically to
content displayed in paged media (e.g., printers), and there is value to the
option of printing content several columns across.

Jul 20 '05 #6

P: n/a
Mark Johnson 10*******@compuserve.com wrote:
Johannes Koch <ko**@w3development.de> wrote:
Robert Bowen wrote:

My question -- with CSS (because with HTML tables I don't think it's
possible) how can I make my text "flow" in two columns? eg. If there
are 100 lines of content, I would like 50 to be in the 1st column, and
50 in the other. If there are 200, 100 / 100. You get the idea. I'll just bet it's simple

No, it is not.


I wouldn't think so, either. Sounds like server side programming,
rather. With xslt I supposed you could use count and keep a recursive
counter to half of that, and then break to new <td> or whatever,
assuming you don't want to group subcategories or blocks.

There is no automatic column flow control in CSS now. Why
should it be?


Float is kind of like that. And NN used to have <multicol>. It seems
the logical thing, either for proprietary tags or some future CSS.
Styles are supposed to be about the presentation side and appearance,
after all, positioning, box models and all that? Having text processor
column support, as it were, seems very consistent with that. And I
mean if NN could support multicol, with gutter widths, as far back as
NN 3 in the mid 90s, it's not like it can't be done. CSS3 specifies
that options be applied to boxes in the case of page breaks, for ex.


the reason it's not a smart idea is that newspaper style columns of text
don't work for screen display in the way they do on paper...the last thing
you want for screen display it to have to scroll all the way down a column
and then have to scroll back to the top and back down the next column...it
is far more effort than simply scrolling down

it could be done...it would largely be totally pointless

it's the sort of thing people often think is a cute idea after looking at
some paper layouts...it's also the sort of thing that site users complain
about when trying to use it on the web...the idea isn't new...people HAVE
come up with ways of emulating it...they tend not to bother with it for
very long

the only way such columns work is with small amounts of text...at anything
over 15 lines or so it's best avoided...at anything less it's largely
pointless

--
eric
www.ericjarvis.co.uk
"live fast, die only if strictly necessary"
Jul 20 '05 #7

P: n/a
Eric Jarvis wrote:
the only way such columns work is with small amounts of text...at anything
over 15 lines or so it's best avoided...at anything less it's largely
pointless


Multicolumn could work. If the browser would detect window height, and
add more columns, when content would not fit. So that users would only
need to scroll right. It wouldn't cause problems, if pageup/down, and
mouse wheel, and all other means to scroll down would then work to scroll
right.

It might be sencible aproach on some text intensive thing, like ebooks,
but I doubt it would be good for webpages. But the gain against normal
scrolling down would be quite minimal.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
I'm looking for work | Etsin työtä
Jul 20 '05 #8

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote:
"Mark Johnson" <10*******@compuserve.com> wrote in message
news:05********************************@4ax.com.. .
Johannes Koch <ko**@w3development.de> wrote:
>Robert Bowen wrote: >> My question -- with CSS (because with HTML tables I don't think it's
>> possible) how can I make my text "flow" in two columns? eg. If there
>> are 100 lines of content, I would like 50 to be in the 1st column, and
>> 50 in the other. If there are 200, 100 / 100. You get the idea. >> I'll just bet it's simple >No, it is not.
I wouldn't think so, either. Sounds like server side programming,
rather. With xslt I supposed you could use count and keep a recursive
counter to half of that, and then break to new <td> or whatever,
assuming you don't want to group subcategories or blocks.
The server doesn't know where the lines are going to break in the client
Yes it does. He's describing a list of items. You simply split the
half of them into table cells, divs, what have you, as the page is
created. This isn't about flowing text. You're just putting the half
one place, and the other half somewhere else.

>There is no automatic column flow control in CSS now. Why
>should it be?

Float is kind of like that. Not at all. There is no flow from one block to another.


I believe there is:
And NN used to have <multicol>. It seems
the logical thing, either for proprietary tags or some future CSS.
Styles are supposed to be about the presentation side and appearance,
after all, positioning, box models and all that? Having text processor
column support, as it were, seems very consistent with that. And I
mean if NN could support multicol, with gutter widths, as far back as
NN 3 in the mid 90s, it's not like it can't be done. CSS3 specifies
that options be applied to boxes in the case of page breaks, for ex.


For example, at a page break, a block could be left open at the border
or closed.

I'm not saying it's flowing text. But multicol was sort of that. And
it doesn't seem to violate any rule regarding 'anonymous content'.
Jul 20 '05 #9

P: n/a
Eric Jarvis <we*@ericjarvis.co.uk> wrote:
the reason it's not a smart idea is that newspaper style columns of text
don't work for screen display in the way they do on paper...the last thing
you want for screen display it to have to scroll all the way down a column
That's the point that's used. You have only a window on the page -
like someone nearsighted using a magnifying sheet.

it could be done...it would largely be totally pointless
It would be just perfect for indices, for example, if you don't want
to insert hard column breaks, in whatever way. But you would like the
option of keeping a sub-block together.

it's the sort of thing people often think is a cute idea after looking at
some paper layouts...it's also the sort of thing that site users complain
about when trying to use it on the web...the idea isn't new...people HAVE
come up with ways of emulating it...they tend not to bother with it for
very long


It would be too much of a workaround. Workarounds are the thing you
jettison as soon as the feature is properly implemented. There's no
substitute. This has to be system level programming.

Jul 20 '05 #10

P: n/a

"Mark Johnson" <10*******@compuserve.com> wrote in message
news:o3********************************@4ax.com...
"Harlan Messinger" <h.*********@comcast.net> wrote:
"Mark Johnson" <10*******@compuserve.com> wrote in message
news:05********************************@4ax.com.. .
Johannes Koch <ko**@w3development.de> wrote:Robert Bowen wrote:> My question -- with CSS (because with HTML tables I don't think it's
>> possible) how can I make my text "flow" in two columns? eg. If there
>> are 100 lines of content, I would like 50 to be in the 1st column, and >> 50 in the other. If there are 200, 100 / 100. You get the idea.> I'll just bet it's simpleNo, it is not. I wouldn't think so, either. Sounds like server side programming,
rather. With xslt I supposed you could use count and keep a recursive
counter to half of that, and then break to new <td> or whatever,
assuming you don't want to group subcategories or blocks.
The server doesn't know where the lines are going to break in the client
Yes it does. He's describing a list of items. You simply split the
half of them into table cells, divs, what have you, as the page is
created.


Even though he could have meant that, he didn't specify that at all.
This isn't about flowing text.
I guess I was confused by the part where he wrote "how can I make my text
'flow' in two columns?".
You're just putting the half
one place, and the other half somewhere else.
There is no automatic column flow control in CSS now. Why
>should it be? Float is kind of like that.
Not at all. There is no flow from one block to another.
I believe there is:


I've never seen text leak out of the float block that contains it and into
another arbitrary block on the page.
And NN used to have <multicol>. It seems
the logical thing, either for proprietary tags or some future CSS.
Styles are supposed to be about the presentation side and appearance,
after all, positioning, box models and all that? Having text processor
column support, as it were, seems very consistent with that. And I
mean if NN could support multicol, with gutter widths, as far back as
NN 3 in the mid 90s, it's not like it can't be done. CSS3 specifies
that options be applied to boxes in the case of page breaks, for ex.

For example, at a page break, a block could be left open at the border
or closed.


HTML doesn't know about page breaks. In the HTML code, an end tag is either
in a particular place or not.

I'm not saying it's flowing text.
You said above that you believe text does flow from one block to another,
but now you're *not* saying it's flowing text.

If you're not saying it's flowing text, then why are you presenting it as an
evidence that you can have flowing text?
But multicol was sort of that.
That's nice, but what bearing does that have on the current question with
respect to current browsers and standard HTML and CSS?
And
it doesn't seem to violate any rule regarding 'anonymous content'.


I don't know what that means or how it relates to anything I said.

Jul 20 '05 #11

P: n/a
"Harlan Messinger" <h.*********@comcast.net> wrote:
"Mark Johnson" <10*******@compuserve.com> wrote in message
news:o3********************************@4ax.com.. .
"Harlan Messinger" <h.*********@comcast.net> wrote:
>"Mark Johnson" <10*******@compuserve.com> wrote in message
>news:05********************************@4ax.com.. .
>> Johannes Koch <ko**@w3development.de> wrote:
This isn't about flowing text.
I guess I was confused by the part where he wrote "how can I make my text
'flow' in two columns?".
And:
You're just putting the half
one place, and the other half somewhere else.
>> Float is kind of like that. >Not at all. There is no flow from one block to another. I believe there is: I've never seen text leak out of the float block
But the blocks themselves do. Float left, for example. If there's
room, the block is off to the right. If not, it's below.

And:
>> And NN used to have <multicol>. It seems
>> the logical thing, either for proprietary tags or some future CSS.
>> Styles are supposed to be about the presentation side and appearance,
>> after all, positioning, box models and all that? Having text processor
>> column support, as it were, seems very consistent with that. And I
>> mean if NN could support multicol, with gutter widths, as far back as
>> NN 3 in the mid 90s, it's not like it can't be done. CSS3 specifies
>> that options be applied to boxes in the case of page breaks, for ex.

For example, at a page break, a block could be left open at the border
or closed. HTML doesn't know about page breaks.
CSS does, or what I read of CSS 3, at any rate.
it doesn't seem to violate any rule regarding 'anonymous content'.

I don't know what that means


I believe it's a term you'll find in the W3C spec for 2 or 3.
Jul 20 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.