
Cras mattis iudicium purus sit amet fermentum. Petierunt uti sibi concilium totius Galliae in diem certam indicere. At nos hinc posthac, sitientis piros Afros. Praeterea iter est quasdam res quas ex communi. Donec sed odio operae, eu vulputate felis rhoncus. I then added a transform: translateX(-25%) to shift the heading back by 25%. Ambitioni dedisse scripsisse iudicaretur. Another way is to use the line-height and vertical-align properties. Thinking back to old skool techniques for centrally aligning content, I immediately turned to CSS positioning applying position: relative to the heading and shifting it 50% to the right. The most common way is to use the text-align property to center text horizontally. The first thing I needed to do was find a way to mimic text-align: center without using the text-align property.



The problem I had to solve was to find a way of animating a heading element from the center to the left hand edge of a box of unknown (flexible) width. Given that the animation was fairly critical to a project he was working on, I took 5 minutes to attempt to find a solution. My immediate response was of course “no!”, but despite having said that I had a nagging suspicion it was in fact achievable in some (as yet unknown) way. The lines in this paragraph are all centered between the paragraphs margins, thanks to the value center of the CSS property text-align. This week, a colleague of mine asked whether it was possible to animate the CSS text-align property using CSS transitions.
