Forums
This topic is locked
CSS and repeat regions
Posted 05 Feb 2004 15:45:18
1
has voted
05 Feb 2004 15:45:18 jake noble posted:
HiI have a page with the following HTML, which is linked into an external CSS:-
<table width="50px" align="right" >
<?php do { ?>
<tr>
<td class="ntext_time"><?php echo $row_news['timestamp']; ?></td>
</tr>
<tr>
<td class="ntext_item"><?php echo $row_news['newsitem']; ?></td>
</tr>
<?php } while ($row_news = mysql_fetch_assoc($news)); ?>
</table>
I then have this CSS:-
.ntext_time {
FONT-SIZE: 11px;
line-height: normal;
COLOR: #0066FF;
font-family: "Courier New", Courier, mono;
position: absolute;
left: 85%;
height: auto;
width: 20%;
text-align: center;
display: none;
}
.ntext_item {
FONT-SIZE: 11px;
line-height: normal;
COLOR: #0066FF;
font-family: "Courier New", Courier, mono;
position: absolute;
left: 85%;
height: auto;
width: 20%;
text-align: center;
Its for a news section down the right hand side of the screen. I need to be able to display repeat redgions, otherwise i only have one news item.
What happens at the moment is because the BOX is set 50px or 70px from the top, then it repeats, but all the news items end up on top of each other, e.g. can't read them.
What I need to do is have the first timestamp say 50px from the top, the first new item 70px from the top. Then the 2nd timestamp 100px, and the 2nd news item 120px, so they don't overlap.
Any Ideas?
JAKE
Replies
Replied 06 Feb 2004 11:41:00
06 Feb 2004 11:41:00 Lee Diggins replied:
Hi Jake
Just had a quick look at your code and the problem I believe lies with using both a table for layout and CSS for specifying the position of the rows that make up the table. If you want to use the table for layout then remove the positioning attributes from your CSS and apply your CCS only for formatting.
Digga
Sharing Knowledge Saves Valuable Time!!!
Just had a quick look at your code and the problem I believe lies with using both a table for layout and CSS for specifying the position of the rows that make up the table. If you want to use the table for layout then remove the positioning attributes from your CSS and apply your CCS only for formatting.
Digga
Sharing Knowledge Saves Valuable Time!!!