Is there a way without writing a bunch of css and nesting divs or writing jQuery scripts with negativ width values?
If not, what´s your preferred way of implementing this?
I have no idea why such a simple task is not part of the html specification.
Edit: With 'absolutely' I also mean vertically centered! Sorry. Plus: It should work with dynamical widths (don´t want to specify them).
I´d like to have something like this:
<div class="ninja-center"></div>
And the div appears in the center of the screen. It really should be THAT easy. No freaky css, scripts, etc. I mean it also works with 2, 3 or 4 ways like this with only horizontal centering:
margin: auto
text-align: center
align="center"
(obsolete)- ...
Why is there nothing for vertical alignments.