burgeamon
08-21-2007, 12:44 PM
Hi guys, im totally new to CSS and have been experementing the past few days.
What I have is a table with a loop wrapped around a table row, this will be database driven eventually but for the time being I just want to get it working.
Is there a way I can produce the same results without a table, and if there are im not totally sure what the benefits are.
Please find the code below.
<div class="newsContent">
<table width="493" border="0" cellspacing="0" cellpadding="8">
<%
dim newsitem
newsitem=1
do until newsitem=6
%>
<tr>
<td width="67" align="left" valign="top"><img src="images/news_thumbnails/card1.jpg" alt="card thumbnail" width="67" height="67" /></td>
<td width="394" align="left" valign="top"><strong>July 31st 2007 - Game tonight in Crediton</strong><br />
There will be prizes for players scoring the most points at the game in the Corner House in Crediton tonight.Good luck!
</td>
</tr>
<%
newsitem = newsitem + 1
loop
%>
</table>
</div>
The CSS.
.centerBox{
margin:0 0 10px 0;
padding:0;
}
.centerBox .newsContent {
background-color:#FFFFFF;
border-right-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-right-color: #a70707;
border-left-color: #a70707;
}
Cheers,
Andy
What I have is a table with a loop wrapped around a table row, this will be database driven eventually but for the time being I just want to get it working.
Is there a way I can produce the same results without a table, and if there are im not totally sure what the benefits are.
Please find the code below.
<div class="newsContent">
<table width="493" border="0" cellspacing="0" cellpadding="8">
<%
dim newsitem
newsitem=1
do until newsitem=6
%>
<tr>
<td width="67" align="left" valign="top"><img src="images/news_thumbnails/card1.jpg" alt="card thumbnail" width="67" height="67" /></td>
<td width="394" align="left" valign="top"><strong>July 31st 2007 - Game tonight in Crediton</strong><br />
There will be prizes for players scoring the most points at the game in the Corner House in Crediton tonight.Good luck!
</td>
</tr>
<%
newsitem = newsitem + 1
loop
%>
</table>
</div>
The CSS.
.centerBox{
margin:0 0 10px 0;
padding:0;
}
.centerBox .newsContent {
background-color:#FFFFFF;
border-right-width: 1px;
border-left-width: 1px;
border-top-style: none;
border-right-style: solid;
border-bottom-style: none;
border-left-style: solid;
border-right-color: #a70707;
border-left-color: #a70707;
}
Cheers,
Andy