How do you give a <body> a 10px margin on every side, then a border? That
is, an inset border.
In the example below, the browsers I've tried interpret "width:100% " as 100%
of the width including margins (the same width the height). As the actual
display area for the body contents is the window display area minus the CSS
margin, scroll bars show up.
I don't want hard-coded dimensions, the body should resize and reflow (and,
when needed, scroll bars show up) as the window is resized.
--
Joakim Braun
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body{margin:10p x;border:1px solid black;width:100 %;height:100%;}
</style>
</head>
<body>
</body>
</html>
is, an inset border.
In the example below, the browsers I've tried interpret "width:100% " as 100%
of the width including margins (the same width the height). As the actual
display area for the body contents is the window display area minus the CSS
margin, scroll bars show up.
I don't want hard-coded dimensions, the body should resize and reflow (and,
when needed, scroll bars show up) as the window is resized.
--
Joakim Braun
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
"http://www.w3.org/TR/REC-html40/loose.dtd">
<html>
<head>
<title>demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css">
body{margin:10p x;border:1px solid black;width:100 %;height:100%;}
</style>
</head>
<body>
</body>
</html>
Comment