- From: James Elmore <James.Elmore@cox.net>
- Date: Sat, 29 Dec 2007 12:27:35 -0800
- To: John Oyler <johnoyler.css@gmail.com>, CSS <www-style@w3.org>
On Dec 27, 2007, at 8:00 AM, John Oyler wrote: > > > On Dec 27, 2007, at 5:27 AM, Anne van Kesteren wrote: > >> >> On Wed, 26 Dec 2007 16:55:42 +0100, Brad Kemper >> <brkemper@comcast.net> wrote: >>> float:center would also be darn useful. >> >> Every now and then someone suggests this and I tend to ignore >> those e-mails as I've no idea how this would realistically work, >> but asking is probably better so I get an understanding of what >> people expect this feature to do. > > Can't the effect they're looking for be had by merely centering the > element with margin: whatever auto ? Or do they specifically want > text to reflow around it? This is a problem I noticed before, and commented on, but got no replies when I posted. 'float' does several things: 1. changes the position of the block being 'floated' to the left or right. 2. moves inline blocks and text which had already been positioned so the 'float' is not over it. and 3. flows the following inline elements (blocks and text) so they 'wrap' around the 'floated' object. Some of these things can be controlled using CSS, but the reflow of inline blocks (2 and 3) and text are only triggered by the use of a 'float: left;' (or 'right'). If 'float: center;' is allowed, some means of controlling the reflows will be needed. I would like to see something like 'reflow' which takes parameters such as 'before', 'after', and 'both'. This would allow designers to control text (and inline block) reflowing around arbitrarily positioned elements. If the 'float' is sort of in the middle, the text could fill the line before the element, skip the space where the 'float' is, and then fill the line after the element. But this has to be under the control of the designer (or layout manager). > > What would happen if you float two elements, when floating both > left, they just stack up against the side, Even this is not exactly set in stone. What if the first element is 'short' and the second is taller. Might the designer want the text after the elements where they are next to each other, but on both sides of the taller element where it sticks out beyond the first element? (I'm not sure that I can draw this reasonably in ASCII characters. If what I've said isn't clear, I will try and explain, diagram it better. > but obviously two elements can't be in the center simultaneously. > Would you center them at their common center then, or does the > second float: center'ed element wrap down below it? > Can the different things that the 'float' style keywords cause to happen be controlled by the designer, so the designer can say, for example, 'float these two items in the center, but make the second clear the first' or 'float these two items in the center, next to each other.' The problem is that 'float' causes several things to happen, but only some of them are controllable by the user. This needs to change. > How many uses of this would there realistically be? Are there any > examples of such in typography at all? Some magazines used to position an image or 'pull out quote' in the middle of articles. While I have seen the more common 'float between columns', I have also seen the text reflowed so the words just skip the area where the float is and continue on the other side. (This works best with wide columns and small floats.) I even recall some articles with three (narrower) columns where the 'float' caused margin changes in the left and right columns, and caused the text to skip over the image in the center column. > > > It only makes sense if inline stuff reflows around it to appear on > both sides, but even then I can't figure out what the effect should > be. Do the two sides act as columns, and text wraps down the left, > and then starts up at the right? It can't do that and make much > sense, but then having each line skip something wide in the center > and move to the other side doesn't work well either. > > This sounds like something I think that I would have wanted before > I learned CSS better. > > John Oyler > john@discrevolt.com > > > > James Elmore
Received on Saturday, 29 December 2007 20:27:52 UTC