Re: poetry advice sought

Re: poetry advice sought

am 29.03.2008 10:57:19 von Ben C

On 2008-03-29, dorayme wrote:
> In article ,
[...]
>> Chris's solution strategy is probably the best. Find the length of the
>> longest line in ems (-I think he arrived at 25em) and set the div width to
>> that, with margin:auto;. I would retain the white-space:nowrap;, though.
>
> You have to be a bit careful with specifying a width. With some fonts,
> eg, Courier, I found 25em was too little. I was looking at B's pre and
> it came up in my default Courier. But if you allow for the widest of the
> fonts, you will bugger up the centering a bit! Swings and roundabouts.
>
> Anyway, might as well throw in my fiddling too:
>
>

Rather than guess 26em will be enough you really want centered
shrink-to-fit block here. Replace width: 26em on body with display:
table.

See also

http://netweaver.com.au/alt/shrinkToFitCentring/centeringShr inkToFit.html

:)

Re: poetry advice sought

am 29.03.2008 16:14:00 von JWS

Ben C wrote:
> Rather than guess 26em will be enough you really want centered
> shrink-to-fit block here. Replace width: 26em on body with display:
> table.
>
> See also
>
> http://netweaver.com.au/alt/shrinkToFitCentring/centeringShr inkToFit.html

Thanks, everyone, for all reactions. I nοw think some kind of
"shrink-to-fit block" approach is probably the best, will post
result when finished.

Regards, Jan

Re: poetry advice sought

am 29.03.2008 21:41:33 von jkorpela

Scripsit Ben C:

> Rather than guess 26em will be enough you really want centered
> shrink-to-fit block here. Replace width: 26em on body with display:
> table.

Somewhat impractical, since it fails on IE, thus in most browsing
situations.

You could use

markup... but stay tuned to getting flamed by
Purists.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Re: poetry advice sought

am 29.03.2008 22:00:05 von dorayme

In article ,
"Jukka K. Korpela" wrote:

> Scripsit Ben C:
>
> > Rather than guess 26em will be enough you really want centered
> > shrink-to-fit block here. Replace width: 26em on body with display:
> > table.
>
> Somewhat impractical, since it fails on IE, thus in most browsing
> situations.
>
> You could use

markup... but stay tuned to getting flamed by
> Purists.

In this particular case, it will irritate some people for me to add (the
Purists, no doubt), that there is nothing particularly wrong with a one
col table where there is a clear relationship between the two or three
rows, the top one or two being the title of the poem and author, the
bottom being the poem.

--
dorayme

Re: poetry advice sought

am 29.03.2008 22:30:11 von Ben C

On 2008-03-29, Jukka K. Korpela wrote:
> Scripsit Ben C:
>
>> Rather than guess 26em will be enough you really want centered
>> shrink-to-fit block here. Replace width: 26em on body with display:
>> table.
>
> Somewhat impractical, since it fails on IE, thus in most browsing
> situations.

That's why I put the link to dorayme's page which explains that and has
a workaround for IE.

> You could use

markup... but stay tuned to getting flamed by
> Purists.

You could also use display: inline-block with text-align: center on the
container.

This should work in at least Opera, Safari and Firefox 3.

I had thought that inline-blocks sort of worked in IE but that
shrink-to-fit auto widths on them were the one thing that didn't. But
looking again at dorayme's page

http://netweaver.com.au/alt/shrinkToFitCentring/centeringShr inkToFit.html

the suggested solution for IE does seem to be doing just that.

So here is an inline-block version:

http://www.tidraso.co.uk/misc/yeats.html

which might work in IE (wild guess, not tested), but doesn't work in
Firefox 2. So you could conditionally use display: table for Firefox
2. Or try something involving -moz-inline-box but I don't know what the
behaviour of that is supposed to be.

Re: poetry advice sought

am 29.03.2008 23:00:35 von dorayme

In article ,
Ben C wrote:

> On 2008-03-29, Jukka K. Korpela wrote:
> > Scripsit Ben C:
> >
> >> Rather than guess 26em will be enough you really want centered
> >> shrink-to-fit block here. Replace width: 26em on body with display:
> >> table.
> >
> > Somewhat impractical, since it fails on IE, thus in most browsing
> > situations.
>
> That's why I put the link to dorayme's page which explains that and has
> a workaround for IE.
>
> > You could use

markup... but stay tuned to getting flamed by
> > Purists.
>
> You could also use display: inline-block with text-align: center on the
> container.
>
> This should work in at least Opera, Safari and Firefox 3.
>
> I had thought that inline-blocks sort of worked in IE but that
> shrink-to-fit auto widths on them were the one thing that didn't. But
> looking again at dorayme's page
>
> http://netweaver.com.au/alt/shrinkToFitCentring/centeringShr inkToFit.html
>
> the suggested solution for IE does seem to be doing just that.
>
> So here is an inline-block version:
>
> http://www.tidraso.co.uk/misc/yeats.html
>
> which might work in IE (wild guess, not tested), but doesn't work in
> Firefox 2. So you could conditionally use display: table for Firefox
> 2. Or try something involving -moz-inline-box but I don't know what the
> behaviour of that is supposed to be.

Unfortunately not on IE6, no.

--
dorayme