When displaying the echoed text below, I noticed that "DURING" sometimes overlaps with the variable $submittor
when there are not enough
s. On the other hand, if too many
s are added, there ends up being excessive space between $submittor
and "DURING" for shorter values of $submittor
.
Is there a method to ensure that "DURING" always begins two spaces (or 5 pixels) after the end of $submittor
, regardless of the length of $submittor
?
Thank you in advance,
John
The provided code snippet:
echo '<div class="sitename3name">SUBMITTED BY <a href="http://www...com/.../members/index.php?profile='.$submittor.'" >'.$submittor.'</a> DURING '.$dt->format('F j, Y &\nb\sp &\nb\sp g:i a').'</div>';
The accompanying CSS style rules:
.sitename3name {
position:absolute;
width:800px;
left:31px;
top:189px;
color: #999999;
font-family:Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: normal;
height: 5px;
padding-bottom: 0px;
}
.sitename3name a{
position:absolute;
color: #004284;
text-decoration:none;
font-family:Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
height: 5px;
padding-bottom: 0px;
}
.sitename3name a:hover{
position:absolute;
color: #FFFFFF;
background-color:#FF0000;
text-decoration:none;
font-family:Arial, Helvetica, sans-serif;
font-size: 10px;
font-weight: bold;
height: 5px;
padding-bottom: 0px;
}