mkrausnick
Programmer
With this code:
I get nice self-centering text, but horizontally the border spans the entire width of the screen.
I want the border to "shrink to fit" the content so there's a small box in the center just large enough to contain the content.
How do I do that?
Thanks greatly.
Mike Krausnick
Dublin, California
Code:
<html>
<head>
<style type="text/css">
#container { margin: 0 auto; text-align: center; border:2px solid}
</style>
<body>
<div id="container">
page content goes here
</div>
</body>
</html>
I get nice self-centering text, but horizontally the border spans the entire width of the screen.
I want the border to "shrink to fit" the content so there's a small box in the center just large enough to contain the content.
How do I do that?
Thanks greatly.
Mike Krausnick
Dublin, California