Positioning Text Triggered by a Function
- by John
Hello,
I would like the text below classed with "logintocomment" to appear 30 px below the bottom of the table classed with "commentecho." Instead, with the CSS and code below, the text classed with "logintocomment" is appearing at the bottom of the browser window.
Any idea how I can make it do what I want?
Thanks in advance,
John
In index file:
include "comments.php";
include "commentformonoff.php";
In the file comments.php:
echo "<table class=\"commentecho\">";
The file: commentformonoff.php:
<?php
if (!isLoggedIn())
{
if (isset($_POST['cmdlogin']))
{
if (checkLogin($_POST['username'], $_POST['password']))
{
show_commentbox($submissionid, $submission, $url, $submittor, $submissiondate, $countcomments, $dispurl);
} else
{
echo "<div class='logintocomment'>Login to comment</div>";
}
} else
{
echo "<div class='logintocomment'>Login to comment</div>";
}
} else
{
show_commentbox($submissionid, $submission, $url, $submittor, $submissiondate, $countcomments, $dispurl);
}
?>
The CSS:
table.commentecho {
margin-top: 230px;
margin-left: 30px;
text-align: left;
font-family: "Times New Roman", Times, serif;
font-weight: normal;
font-size: 15px;
color: #000000;
width: 600px;
table-layout:fixed;
background-color: #FFFFFF;
border: 2px #FFFFFF;
border-collapse: collapse;
border-spacing: 2px;
padding: 1px;
text-decoration: none;
vertical-align: text-bottom;
margin-bottom: 30px;
}
table.commentecho td {
border: 2px solid #fff;
text-align: left;
height: 18px;
overflow:hidden;
}
table.commentecho td a{
padding: 2px;
color: #000000;
text-decoration: none;
overflow:hidden;
height: 18px;
}
table.commentecho td a:hover{
background-color: #FFFFFF;
padding: 2px;
color: #FF0000;
text-decoration: none;
overflow:hidden;
height: 18px;
}
.logintocomment
{
margin-top: 30px;
margin-left: 30px;
width:250px;
text-align: left;
margin-bottom:3px;
padding:0px;
font-family:Arial, Helvetica, sans-serif;
font-size: 20px;
color:#000000;
}