gpigate
04-28-2010, 04:12 PM
I am new at trying to do everything with css and I am nowhere near there yet. However I am trying to learn as go. So with that said, please dont blast the code too bad :) I do want to continue learning though so pointers are appreciated.
this page (http://outdoorsindoors.net/DEV/BVO/index.php?page=mods/staff/mindex&month=10&year=2009)
On the page aboe you can see where there is a left column listing months, then on the right will be a blog for that month by a staff member.
There is a white space / line between those two images. It appears to be caused by a cellspacing/padding issue, but I can not get it to work out regardless of what I try.
The important css attributes are
.jmonthl{background-image:url('smonthbg.jpg'); height:500px; width:200px; padding: 30px 0 0 0; margin:0 0 0 0; border:0;}
.jmonth_header{ color: #ffffff; font-size: 12pt; font-family:Geneva, Arial, Helvetica, sans-serif }
.mlink a{ color: #ffffff; font-size: 12pt; font-family:Geneva, Arial, Helvetica, sans-serif; padding: 0 0 0 20px;}
.jmonthhead{background-image:url('monthhead.jpg'); height:50px; width:298px; text-align:left; padding:0; border:0; }
.jmonthheadlink{ color: #000000; font-size: 12pt; font-family:Geneva, Arial, Helvetica, sans-serif; padding: 5px 0 0 25px; font-weight:bold; margin:0px }
.jmiddle{ padding:25px 0 0 0; margin:0px; }
.middletable{width:550px; padding:0 0 0 0; margin: 0 0 0 0; }
and the php /html is
<table width="100%" ><tr><td align="right"><a href="index.php?page=mods/staff/index">Journals by Staff Member</a></td></tr></table>
<table align="left" cellpading="0" cellspacing="0">
<tr><td valign="top">
<table cellpading="0" cellspacing="0">
<!--<tr><td valign="top"><p class="jmonth_header">Monthly</p></td></tr>-->
<tr><Td class="jmonthl" valign="top" >
<?php $lsql = mysql_query("SELECT DISTINCT month, year, count(id) as numr FROM table_name where `release` = 1 and archive <> 1 group by month, year order by year desc, month desc");
while ($list = mysql_fetch_array($lsql)){
switch ($list["month"]){ case 1: $m = "January"; break;
case 2: $m = "February"; break;
case 3: $m = "March"; break;
case 4: $m = "April"; break;
case 5: $m = "May"; break;
case 6: $m = "June"; break;
case 7: $m = "July"; break;
case 8: $m = "August"; break;
case 9: $m = "September"; break;
case 10: $m = "October"; break;
case 11: $m = "November"; break;
case 12: $m = "December"; break;
case 0: $m = "Not Set"; }
echo "<p class=\"mlink\"><a href=\"index.php?page=mods/staff/mindex&month=".$list["month"]."&year=".$list["year"]."\">".$m." ".$list["year"]." (".$list["numr"].")</a></p>";
}
if (!isset($_GET["month"])){
$month = date(n);
$y = date(Y);
} else {
$month = $_GET["month"];
$y=$_GET["year"];
}
switch ($month){
case 1: $m = "January"; break;
case 2: $m = "February"; break;
case 3: $m = "March"; break;
case 4: $m = "April"; break;
case 5: $m = "May"; break;
case 6: $m = "June"; break;
case 7: $m = "July"; break;
case 8: $m = "August"; break;
case 9: $m = "September"; break;
case 10: $m = "October"; break;
case 11: $m = "November"; break;
case 12: $m = "December"; break;
case 0: $m = "Not Set"; }
?>
</Td></Tr>
</table>
</td>
<td valign="top" class="jmiddle">
<table class="middletable" >
<tr><td class="jmonthhead" align="left" ><p class="jmonthheadlink"><?php echo $m." ".$y;?></p></td></tr>
<?php
$sql = mysql_query("select * from table_name where month = ".$month." and year = ".$y." and `release` = 1 and archive <> 1 ");
$count = mysql_num_rows($sql);
if ($count==0){
echo "<tr><td class=\"jtitle\">No Journal Entries Found</td></tr>";
}
while ($row = mysql_fetch_array($sql)){
$nsql = mysql_query("select * from table_name where userid = ".$row["userid"]."");
$n=mysql_fetch_array($nsql);
$name = $n["fname"]." ".$n["lname"];
?>
<tr><td align="left" ><table width="100%">
<tr><td valign="top" width="150"><img src = "<?php echo ($row["thumb"]==''?"mods/staff/thumbs/blank.jpg":$row["thumb"]);?>" width="150"></td>
<td valign="top" align="left"><p class ="jtitle"><?php echo $row["subject"];?></p><?php echo $name."<br>".$row["preview"];?>
<p style="float:right"><a href="index.php?page=mods/staff/detail&id=<?php echo $row["id"];?>"><img src="themes/BVO/view.jpg" border="0" /></a></p></Td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
I would love to get to where I do not use tables any more so if you see how to do this with this one and would like to make an example please do. Otherwise any help with the white space between those 2 images would be greatly appreciated.
this page (http://outdoorsindoors.net/DEV/BVO/index.php?page=mods/staff/mindex&month=10&year=2009)
On the page aboe you can see where there is a left column listing months, then on the right will be a blog for that month by a staff member.
There is a white space / line between those two images. It appears to be caused by a cellspacing/padding issue, but I can not get it to work out regardless of what I try.
The important css attributes are
.jmonthl{background-image:url('smonthbg.jpg'); height:500px; width:200px; padding: 30px 0 0 0; margin:0 0 0 0; border:0;}
.jmonth_header{ color: #ffffff; font-size: 12pt; font-family:Geneva, Arial, Helvetica, sans-serif }
.mlink a{ color: #ffffff; font-size: 12pt; font-family:Geneva, Arial, Helvetica, sans-serif; padding: 0 0 0 20px;}
.jmonthhead{background-image:url('monthhead.jpg'); height:50px; width:298px; text-align:left; padding:0; border:0; }
.jmonthheadlink{ color: #000000; font-size: 12pt; font-family:Geneva, Arial, Helvetica, sans-serif; padding: 5px 0 0 25px; font-weight:bold; margin:0px }
.jmiddle{ padding:25px 0 0 0; margin:0px; }
.middletable{width:550px; padding:0 0 0 0; margin: 0 0 0 0; }
and the php /html is
<table width="100%" ><tr><td align="right"><a href="index.php?page=mods/staff/index">Journals by Staff Member</a></td></tr></table>
<table align="left" cellpading="0" cellspacing="0">
<tr><td valign="top">
<table cellpading="0" cellspacing="0">
<!--<tr><td valign="top"><p class="jmonth_header">Monthly</p></td></tr>-->
<tr><Td class="jmonthl" valign="top" >
<?php $lsql = mysql_query("SELECT DISTINCT month, year, count(id) as numr FROM table_name where `release` = 1 and archive <> 1 group by month, year order by year desc, month desc");
while ($list = mysql_fetch_array($lsql)){
switch ($list["month"]){ case 1: $m = "January"; break;
case 2: $m = "February"; break;
case 3: $m = "March"; break;
case 4: $m = "April"; break;
case 5: $m = "May"; break;
case 6: $m = "June"; break;
case 7: $m = "July"; break;
case 8: $m = "August"; break;
case 9: $m = "September"; break;
case 10: $m = "October"; break;
case 11: $m = "November"; break;
case 12: $m = "December"; break;
case 0: $m = "Not Set"; }
echo "<p class=\"mlink\"><a href=\"index.php?page=mods/staff/mindex&month=".$list["month"]."&year=".$list["year"]."\">".$m." ".$list["year"]." (".$list["numr"].")</a></p>";
}
if (!isset($_GET["month"])){
$month = date(n);
$y = date(Y);
} else {
$month = $_GET["month"];
$y=$_GET["year"];
}
switch ($month){
case 1: $m = "January"; break;
case 2: $m = "February"; break;
case 3: $m = "March"; break;
case 4: $m = "April"; break;
case 5: $m = "May"; break;
case 6: $m = "June"; break;
case 7: $m = "July"; break;
case 8: $m = "August"; break;
case 9: $m = "September"; break;
case 10: $m = "October"; break;
case 11: $m = "November"; break;
case 12: $m = "December"; break;
case 0: $m = "Not Set"; }
?>
</Td></Tr>
</table>
</td>
<td valign="top" class="jmiddle">
<table class="middletable" >
<tr><td class="jmonthhead" align="left" ><p class="jmonthheadlink"><?php echo $m." ".$y;?></p></td></tr>
<?php
$sql = mysql_query("select * from table_name where month = ".$month." and year = ".$y." and `release` = 1 and archive <> 1 ");
$count = mysql_num_rows($sql);
if ($count==0){
echo "<tr><td class=\"jtitle\">No Journal Entries Found</td></tr>";
}
while ($row = mysql_fetch_array($sql)){
$nsql = mysql_query("select * from table_name where userid = ".$row["userid"]."");
$n=mysql_fetch_array($nsql);
$name = $n["fname"]." ".$n["lname"];
?>
<tr><td align="left" ><table width="100%">
<tr><td valign="top" width="150"><img src = "<?php echo ($row["thumb"]==''?"mods/staff/thumbs/blank.jpg":$row["thumb"]);?>" width="150"></td>
<td valign="top" align="left"><p class ="jtitle"><?php echo $row["subject"];?></p><?php echo $name."<br>".$row["preview"];?>
<p style="float:right"><a href="index.php?page=mods/staff/detail&id=<?php echo $row["id"];?>"><img src="themes/BVO/view.jpg" border="0" /></a></p></Td>
</tr>
</table>
</td>
</tr>
<?php
}
?>
</table>
</td>
</tr>
</table>
I would love to get to where I do not use tables any more so if you see how to do this with this one and would like to make an example please do. Otherwise any help with the white space between those 2 images would be greatly appreciated.