Re: poetry advice sought
On 2008-03-29, dorayme <doraymeRidThis [at] optusnet.com.au> wrote:
> In article <Xns9A6F9B6687FE3neredbojiasnano [at] 85.214.90.236>,
[...]
>> 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:
>
><http://netweaver.com.au/alt/yeats.html>
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
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
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 <table> markup... but stay tuned to getting flamed by
Purists.
--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/
Re: poetry advice sought
In article <OPxHj.317797$dP6.232189 [at] reader1.news.saunalahti.fi>,
"Jukka K. Korpela" <jkorpela [at] cs.tut.fi> 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 <table> 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
On 2008-03-29, Jukka K. Korpela <jkorpela [at] cs.tut.fi> 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 <table> 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
In article <slrnfutd7j.hgt.spamspam [at] bowser.marioworld>,
Ben C <spamspam [at] spam.eggs> wrote:
> On 2008-03-29, Jukka K. Korpela <jkorpela [at] cs.tut.fi> 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 <table> 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