I would like to get a specific layout using CSS, as follows, and I'm not sure if it's possible. There's some text inside a div that is centered. Underneath, there is another div with text inside; what I'd like to do is to right-align this text so that its right edge is flush with the right edge of the text above it.
Using CSS, I have no idea how to do this. Clearly the following approach will not work, because the sub-header will right-align to the container. But is there any trick to accomplish the alignment I want?
<div style='text-align: center;'>This is some headline text</div>
<div style='text-align: right;'>Sub-header text</div>
Note: Strong preference is for straight CSS (no Javascript if possible).
Note #2: I'm not stuck with the above HTML. I can use any markup that accomplishes the described alignment.