Re: [css-d] NOT centering text in the center!

2014-12-17 Thread FARAMINEUX
On Dec 17, 2014, at 8:53 AM, Barney Carroll wrote: > 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 > >

Re: [css-d] NOT centering text in the center!

2014-12-17 Thread Barney Carroll
Excellent insight Jukka! Centered variable width column with CSS2.1 and no offset positioning assumptions – that's a new one in my book! For the sake of pedantry I might add that line-breaks are significant semantic elements in a haiku, and that the haiku I used is considered invalid according to

Re: [css-d] NOT centering text in the center!

2014-12-17 Thread Jukka K. Korpela
2014-12-17, 15:53, Barney Carroll wrote: 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 Nice. Here’s a different idea, with even be

Re: [css-d] NOT centering text in the center!

2014-12-17 Thread Philip Taylor
Barney Carroll wrote: 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 I am not averse to custom HTML elements, and have been known

Re: [css-d] NOT centering text in the center!

2014-12-17 Thread Barney Carroll
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 bar

Re: [css-d] NOT centering text in the center!

2014-12-17 Thread FARAMINEUX
On Dec 17, 2014, at 8:08 AM, Jukka K. Korpela 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: > > > .poem { > width: 20em; /* tune as needed > margin-left: auto; > margin-right: auto; > }

Re: [css-d] NOT centering text in the center!

2014-12-17 Thread Jukka K. Korpela
2014-12-17, 15:00, FARAMINEUX wrote: My goal is to write a haiku or a poem in the center on the page, but I do not want the text to be centered but align left in the center of the page. How can I achieve that? Do I have to use a centered column? The simplest approach is to put your poetry in a

Re: [css-d] NOT centering text in the center!

2014-12-17 Thread Philip Taylor
Place the haiku in a ; centre the . Philip Taylor FARAMINEUX wrote: My goal is to write a haiku or a poem in the center on the page, but I do not want the text to be centered but align left in the center of the page. How can I achieve that? Do I have to use a centered column? TIA