Salut Faramineux,

You can use display inline-block, left 50% (relative to offset parent) and
transform translateX( -50% ) (relative to self) to achieve this effect with
variable width: http://jsbin.com/ruwada/1/edit?css,output

Regards,
Barney Carroll

barney.carr...@gmail.com
+44 7429 177278

barneycarroll.com

On 17 December 2014 at 13:33, FARAMINEUX <faramin...@comcast.net> wrote:
>
> On Dec 17, 2014, at 8:08 AM, Jukka K. Korpela <jkorp...@cs.tut.fi> wrote:
>
> >> The simplest approach is to put your poetry in a `div` element, set
> some suitable width for it, and set its left and right margin to auto:
> >
> > <style>
> > .poem {
> >  width: 20em; /* tune as needed
> >  margin-left: auto;
> >  margin-right: auto;
> > }
> > </style>
> > <div class=poem>
> > </div>
> >
> > If you don’t want to set a fixed width but let the width be as needed
> for the longest line, then you need something more complicated. Please
> specify if this is the case.
> >
> > Yucca
> >
>
> Just tried that and works beautifully. Thanks. BUT haikus are often
> predictable as far as size is concerned. So if I had to use a poem which
> was more difficult, I would love to know the more complicated way. Thank in
> advance.
>
> faramin...@comcast.net
> OS X 10.10
>
> ______________________________________________________________________
> css-discuss [css-d@lists.css-discuss.org]
> http://www.css-discuss.org/mailman/listinfo/css-d
> List wiki/FAQ -- http://css-discuss.incutio.com/
> List policies -- http://css-discuss.org/policies.html
> Supported by evolt.org -- http://www.evolt.org/help_support_evolt/
>
______________________________________________________________________
css-discuss [css-d@lists.css-discuss.org]
http://www.css-discuss.org/mailman/listinfo/css-d
List wiki/FAQ -- http://css-discuss.incutio.com/
List policies -- http://css-discuss.org/policies.html
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to