Hi -
In lieu of easily centering text vertically in a <div>, I am trying to
use margin-top to shove the text down. I have created a <div> wrapper
and put a <p> tag in it and am trying to format the <p>.
My understanding is that the browsers different interpretations of
width also affect how they treat height so I'm doing the margin on the
<p> instead of on the <div>. The following does what I want in IE but
not in FF which from what I've read suggests something is wrong in the
code.
I appreciate any suggestions -
Thanks!
Andrea
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<style type="text/css">
#wrapper {height: 160px; background-color: gray;}
#wrapper p {margin-top: 50px; text-align: center; background-color:
blue;}
</style>
</head>
<body>
<div id="wrapper">
<p>Text in the p in the div, want to see if I can format the margins
properly.</p>
</div>
</body>
</html>