473,385 Members | 1,647 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

How to control flow of dynamic content with CSS?

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
11 7187
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
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
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

"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

"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
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
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
"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
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

"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
"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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Guy Harwood | last post by:
Hi, I have designed a textbox that inherits from the System.Windows.Forms.Textbox control. when the control is readonly the back color changes to a light blue to indicate that it is frozen. ...
1
by: Jorge Ponte | last post by:
hi I have a Web User Control (ascx) - lets call it "My_WUC" - in a Web form. In that WUC I want have a textbox and a button. I want to click on the button and open a popup (I use javascript for...
1
by: Leo | last post by:
I created a user control which is some text contained in a HtmlTable. I put this control into main form. I would like to have the ability to move this control around in the main form. I think one...
7
by: Tom wilson | last post by:
I'm trying to create dynamic controls in ASP.Net. It's driving me nuts. I keep getting the error: Control '16' of type 'RadioButton' must be placed inside a form tag with runat=server. Dim...
5
by: the friendly display name | last post by:
Following problem: I have a site, that has a footer (a panel, with copyright information and so on). Above the footer is of course the content, a other panel with text. When the text of the...
2
by: dawg1998 | last post by:
I have a page that creates dynamic textboxes based on the number of fields a user chooses to fill out. This process worked great when the page was standalone. However, when I move to a...
2
by: johkar | last post by:
My right column content is created dynamically by an application so it will vary in height. When the main content of the page takes up more vertical space than the rigth column, I want the content...
5
by: fireball | last post by:
please help newbie I need to create a lot of objects the same type (let's say: schemas) I wish to use paramerized block in loop to do so. - how to put names of my objects to such control-flow? ...
0
by: Eniac | last post by:
Hi, I've been working on a custom user control that needs to be modified and the validation is causing me headaches. The control used to generate a table of 4 rows x 7 columns to display all...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.