Is it possible to achieve a specific layout using CSS where there is text inside a centered div, and underneath that, another div with right-aligned text? I'm unsure if this can be done effectively.
I am currently unaware of how to accomplish this using CSS. The usual methods result in the sub-header aligning to the container rather than flush with the text above. Is there a workaround to achieve the desired alignment?
<div style='text-align: center;'>This is some headline text</div>
<div style='text-align: right;'>Sub-header text</div>
Note: I would prefer to use only CSS for this (avoiding Javascript if possible).
Note #2: I am open to alternative HTML markup options as long as they achieve the specified alignment.