Lösung 1:
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TITEL</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
}
div.center_parent {
width: 100%;
height: 300px;
margin: 0px;
padding: 0px;
text-align: center;
background-color: #FBC8BF;
}
div.center_text {
width: 90ex;
margin: auto;
padding: auto;
text-align: left;
background-color: #BFC8FB;
}
</style>
</head>
<body>
<div class="center_parent">
<div class="center_text">text text text text<br />text text text text<br />text text text text</div>
</div>
</body>
</html>
Lösung 2:
Code:
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>TITEL</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<style type="text/css">
body {
width: 100%;
height: 100%;
margin: 0px;
padding: 0px;
text-align: center;
}
div.center_text {
width: 90ex;
margin: auto;
padding: auto;
text-align: left;
background-color: #BFC8FB;
}
</style>
</head>
<body>
<div class="center_text">text text text text<br />text text text text<br />text text text text</div>
</body>
</html>
Lesezeichen