Hi,
Consider this example:
The text is centered in both IE & FireFox, but the div is only centered in IE.
Any suggestion why? And how to center divs in FireFox too?
Thanks ;-)
Jakob
Consider this example:
Code:
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "[URL unfurl="true"]http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">[/URL]
<html xmlns="[URL unfurl="true"]http://www.w3.org/1999/xhtml">[/URL]
<head>
<title>Center Elements</title>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
<style type="text/css">
body {
text-align : center;
}
.box {
width : 150px;
height : 50px;
border : solid 1px #000;
}
</style>
</head>
<body>
Centered text (IE & FireFox)
<div class="box">
Centered box (IE Only!?)
</div>
</body>
</html>
Any suggestion why? And how to center divs in FireFox too?
Thanks ;-)
Jakob