jasonc310771
01-16-2008, 08:30 AM
i have tried to do this myself but have no idea what else i can do to get this to work right.
i am trying to place an image (100 x 100) above the word 'clicks' so it does not over lap the word but it does not seem to work it always over laps, i have supplied the code without an image as i thought putting the code here with it may complicate things.
can someone please advise where i need to place code to get an image in this place.
thanks in advance for your help.
<style type="text/css"><!--
.containercolour1 { position:relative; background:#799BD9; margin:0 5px;}
.rtopcolour1, .rbottomcolour1{ display:block; background:#507BCD; }
.rtopcolour1 *, .rbottomcolour1 *{ display: block; height: 1px; overflow: hidden; background:#799BD9; }
.containercolour2 { position:relative; background:#325EAF; margin:0 5px; }
.rtopcolour2, .rbottomcolour2{ display:block; background:#507BCD; }
.rtopcolour2 *, .rbottomcolour2 *{ display: block; height: 1px; overflow: hidden; background:#325EAF; }
.containercolour3 { position:relative; background:#00CC99; margin:0 5px; }
.rtopcolour3, .rbottomcolour3{ display:block; background:#507BCD; }
.rtopcolour3 *, .rbottomcolour3 *{ display: block; height: 1px; overflow: hidden; background:#00CC99; }
.r1{ margin: 0 5px}
.r2{ margin: 0 3px}
.r3{ margin: 0 2px}
.r4{ margin: 0 1px; height: 1px }
a.one:link { color: #000; }
a.one:visited { color: #000; }
a.one:hover { color: #999999; }
a.one:active { color: #000; }
a.one { text-decoration: none; }
a.two:link { color: #000; }
a.two:visited { color: #000; }
a.two:hover { color: #fff; }
a.two:active { color: #000; }
a.two { text-decoration: none; }
h1 { text-align: left; font: small tahoma; font-size: 12px; font-weight: bold; margin: 0 0; padding: 5; }
h2 { text-align: left; font: small tahoma; font-size: 12px; font-weight: bold; margin: 0 5; padding: 5; }
img.floatLeft { float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 3px; }
img.floatRight { float: right; margin: 15px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 3px; }
.right { position:absolute; bottom:4; right:6; }
.floatright { float: right; margin: 0px 0px 0px 2px; }
-->
</style>
<?
if ($_GET['m'] != "") {
$whatmonth = $_GET['m'];
$whatyear = $_GET['y'];
} else {
$whatmonth = gmdate('m');
$whatyear = gmdate('Y');
}
$datetocheck = gmdate("Y-m-d H:i:s");
$links = @mysql_query("SELECT * FROM `sites` WHERE `confirmed` = '1' AND `linklocation` = 'main' AND `submitgmtdatetime` LIKE '%$whatyear-$whatmonth%' AND `submitgmtdatetime` < '$datetocheck' ORDER BY `submitgmtdatetime` DESC" ) or die(mysql_error());
if (@mysql_num_rows($links) == 0) {
?><p><b>There are no links.</b></p><?
} else { ?>
<table width="100%">
<?
for ($i = 0; $i < @mysql_num_rows($links); $i++) {
$id = @mysql_result($links, $i, "id");
$submitgmtdatetime = @mysql_result($links, $i, "submitgmtdatetime");
$url = @mysql_result($links, $i, "url");
$desc = @mysql_result($links, $i, "desc");
$clicks = @mysql_result($links, $i, "clicks");
$submittedby = @mysql_result($links, $i, "submittedby");
?>
<tr><td>
<?
if( $url != "" ) {
?>
<div class="containercolour1">
<b class="rtopcolour1"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b></font><font size="2" color="#000000" face="Tahoma"> <div class="right">
<a href="?i=1" target="_top"><font color="#FFFFFF" size="2" face="Tahoma">comments</font></a>
<font size="2">(</font>1<font size="2">)</font>
(<? echo($clicks); ?> click<? if($clicks>1) { echo("s"); } ?>)</div></font>
<a class="one" href="?v=<? echo($id.$sessioncode);?>" target="_blank"><h1><?=stripslashes($desc);?></h1></a> <font size="2" color="#FFFFFF" face="Tahoma"><? echo ( date('d-m-Y', strtotime($submitgmtdatetime)) ); ?></font><?
if ($submittedby != "") {?> <font size="2" color="#FFFFFF" face="Tahoma"> By <? echo($submittedby);
$countmemberlisting = @mysql_query("SELECT * FROM `sites` WHERE `confirmed` = '1' AND `submittedby` = '$submittedby'" ) or die(mysql_error());
$totalmemberlistings = @mysql_num_rows($countmemberlisting);
?></font><?
} ?>
<b class="rbottomcolour1"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b align="right"></b></b></div>
<? } else { ?>
<div class="containercolour3"><b class="rtopcolour3"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<h1><?=stripslashes($desc);?></h1> <font size="2" color="#FFFFFF" face="Tahoma"><? echo ( date('d-m-Y', strtotime($submitgmtdatetime)) ); ?></font>
<b class="rbottomcolour3"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b></div>
<? } ?>
</td></tr>
<? } ?>
</table>
<? }
?>
i am trying to place an image (100 x 100) above the word 'clicks' so it does not over lap the word but it does not seem to work it always over laps, i have supplied the code without an image as i thought putting the code here with it may complicate things.
can someone please advise where i need to place code to get an image in this place.
thanks in advance for your help.
<style type="text/css"><!--
.containercolour1 { position:relative; background:#799BD9; margin:0 5px;}
.rtopcolour1, .rbottomcolour1{ display:block; background:#507BCD; }
.rtopcolour1 *, .rbottomcolour1 *{ display: block; height: 1px; overflow: hidden; background:#799BD9; }
.containercolour2 { position:relative; background:#325EAF; margin:0 5px; }
.rtopcolour2, .rbottomcolour2{ display:block; background:#507BCD; }
.rtopcolour2 *, .rbottomcolour2 *{ display: block; height: 1px; overflow: hidden; background:#325EAF; }
.containercolour3 { position:relative; background:#00CC99; margin:0 5px; }
.rtopcolour3, .rbottomcolour3{ display:block; background:#507BCD; }
.rtopcolour3 *, .rbottomcolour3 *{ display: block; height: 1px; overflow: hidden; background:#00CC99; }
.r1{ margin: 0 5px}
.r2{ margin: 0 3px}
.r3{ margin: 0 2px}
.r4{ margin: 0 1px; height: 1px }
a.one:link { color: #000; }
a.one:visited { color: #000; }
a.one:hover { color: #999999; }
a.one:active { color: #000; }
a.one { text-decoration: none; }
a.two:link { color: #000; }
a.two:visited { color: #000; }
a.two:hover { color: #fff; }
a.two:active { color: #000; }
a.two { text-decoration: none; }
h1 { text-align: left; font: small tahoma; font-size: 12px; font-weight: bold; margin: 0 0; padding: 5; }
h2 { text-align: left; font: small tahoma; font-size: 12px; font-weight: bold; margin: 0 5; padding: 5; }
img.floatLeft { float: left; margin-top: 0px; margin-right: 10px; margin-bottom: 10px; margin-left: 3px; }
img.floatRight { float: right; margin: 15px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 3px; }
.right { position:absolute; bottom:4; right:6; }
.floatright { float: right; margin: 0px 0px 0px 2px; }
-->
</style>
<?
if ($_GET['m'] != "") {
$whatmonth = $_GET['m'];
$whatyear = $_GET['y'];
} else {
$whatmonth = gmdate('m');
$whatyear = gmdate('Y');
}
$datetocheck = gmdate("Y-m-d H:i:s");
$links = @mysql_query("SELECT * FROM `sites` WHERE `confirmed` = '1' AND `linklocation` = 'main' AND `submitgmtdatetime` LIKE '%$whatyear-$whatmonth%' AND `submitgmtdatetime` < '$datetocheck' ORDER BY `submitgmtdatetime` DESC" ) or die(mysql_error());
if (@mysql_num_rows($links) == 0) {
?><p><b>There are no links.</b></p><?
} else { ?>
<table width="100%">
<?
for ($i = 0; $i < @mysql_num_rows($links); $i++) {
$id = @mysql_result($links, $i, "id");
$submitgmtdatetime = @mysql_result($links, $i, "submitgmtdatetime");
$url = @mysql_result($links, $i, "url");
$desc = @mysql_result($links, $i, "desc");
$clicks = @mysql_result($links, $i, "clicks");
$submittedby = @mysql_result($links, $i, "submittedby");
?>
<tr><td>
<?
if( $url != "" ) {
?>
<div class="containercolour1">
<b class="rtopcolour1"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b></font><font size="2" color="#000000" face="Tahoma"> <div class="right">
<a href="?i=1" target="_top"><font color="#FFFFFF" size="2" face="Tahoma">comments</font></a>
<font size="2">(</font>1<font size="2">)</font>
(<? echo($clicks); ?> click<? if($clicks>1) { echo("s"); } ?>)</div></font>
<a class="one" href="?v=<? echo($id.$sessioncode);?>" target="_blank"><h1><?=stripslashes($desc);?></h1></a> <font size="2" color="#FFFFFF" face="Tahoma"><? echo ( date('d-m-Y', strtotime($submitgmtdatetime)) ); ?></font><?
if ($submittedby != "") {?> <font size="2" color="#FFFFFF" face="Tahoma"> By <? echo($submittedby);
$countmemberlisting = @mysql_query("SELECT * FROM `sites` WHERE `confirmed` = '1' AND `submittedby` = '$submittedby'" ) or die(mysql_error());
$totalmemberlistings = @mysql_num_rows($countmemberlisting);
?></font><?
} ?>
<b class="rbottomcolour1"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b align="right"></b></b></div>
<? } else { ?>
<div class="containercolour3"><b class="rtopcolour3"><b class="r1"></b><b class="r2"></b><b class="r3"></b><b class="r4"></b></b>
<h1><?=stripslashes($desc);?></h1> <font size="2" color="#FFFFFF" face="Tahoma"><? echo ( date('d-m-Y', strtotime($submitgmtdatetime)) ); ?></font>
<b class="rbottomcolour3"><b class="r4"></b><b class="r3"></b><b class="r2"></b><b class="r1"></b></b></div>
<? } ?>
</td></tr>
<? } ?>
</table>
<? }
?>