Posted by richard on 10/03/06 04:23
Simple 3 division design. I want the text in the middle division to be
centered.
If I remove the "float" next to text-align, the right side division breaks.
If I do it any other way, something breaks somewhere.
Please answer only the question at hand. Yes it validates.
<?xml version="1.0" encoding="windows-1252"?>
<!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">
<!-- Created on: 10/2/2006 -->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252" />
<title>test</title>
<style type="text/css">
body {background-color:white; width:100%; margin: 0 0 0 0;}
#container{background-color:white; width:100%; margin:0 0 0 0;}
#hd1{width:150px; height:150px; background-color:#0055ff; float:left; }
#hd2{display:block; text-align:center; float:left; }
#hd3{margin:0 0 0 0; width:150px; height:150px; background-color:#0055FF;
float:right;}
</style>
</head>
<body>
<div id="container">
<div id="hd1">
sample left text
</div>
<div id="hd2">
sample middle text
</div>
<div id="hd3">
sample right text
</div>
</div>
</body>
</html>
Navigation:
[Reply to this message]
|