|
-
Dec 12th, 2001, 04:25 PM
#1
Thread Starter
Frenzied Member
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?
Travis, Kung Foo Journeyman
As always, RTFM.
WWW Standards: HTML 4.01, CSS Level 2, ECMA 262 Bindings to DOM Level 1, JavaScript 1.3 Guide and Reference
Perl: Learn Perl, Llama, Camel, Cookbook, Perl Monks, Perl Mongers, O'Reilly's Perl.com, ActiveState, CPAN, TPJ, and use Perl;
YBMS, but Mozilla doesn't.
-
Dec 13th, 2001, 04:39 AM
#2
Frenzied Member
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>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|