-
Vertical Align With CSS
This forum is quiet.
I have the following:
Code:
<html>
<head>
<style type="text/css">
body {
text-align: center;
}
#myText {
color: #00c000;
background-color: transparent;
}
</style>
</head>
<body>
<p id="myText">Kangaroo</p>
</body>
</html>
I have the text aligned horizontally, but I can't figure out how to align it vertically. I have tried the vertical-align property on both the body and myText, but neither work.
What am I doing wrong?
-
I doesn't look like you can set valign using css:(
perhaps a single cell table would do...
Code:
<html>
<head>
<style type="text/css">
body {
text-align: center;
}
#myText {
color: #00c000;
background-color: transparent;
}
</style>
</head>
<body>
<table width=100% height=100%>
<tr><td valign=center align=center>
<p id="myText">Kangaroo</p>
</td></tr>
</table>
</body>
</html>