Re: poetry advice sought
- From: dorayme <doraymeRidThis@xxxxxxxxxxxxxxx>
- Date: Sat, 29 Mar 2008 15:23:12 +1100
In article <Xns9A6F9B6687FE3neredbojiasnano@xxxxxxxxxxxxx>,
Neredbojias <ex@xxxxxxxxxxx> wrote:
On 28 Mar 2008, JWS <JWS@xxxxxxx> wrote:
Neredbojias wrote:
First of all, try this instead of what you got:
<div style="margin:auto;width:50%;white-space:nowrap;">
Others will probably come along with more comprehensive advice.
If not, I'll be back!
I used your suggestion in a new version of the page:
http://www.jw-stumpel.nl/yeats-test.html
This is definitely better than my original design (behaves better
when the window width is changed) but I can't help thinking that
there might be even better solutions. So please, do come back!
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>
--
dorayme
.
- Follow-Ups:
- Re: poetry advice sought
- From: Ben C
- Re: poetry advice sought
- From: Neredbojias
- Re: poetry advice sought
- References:
- poetry advice sought
- From: JWS
- Re: poetry advice sought
- From: Neredbojias
- Re: poetry advice sought
- From: JWS
- Re: poetry advice sought
- From: Neredbojias
- poetry advice sought
- Prev by Date: Pure space directly inside div ignored, but pure space directly inside span honored
- Next by Date: Re: web hosting
- Previous by thread: Re: poetry advice sought
- Next by thread: Re: poetry advice sought
- Index(es):
Relevant Pages
|