...

View Full Version : CSS and Repeat Region



jakenoble
02-05-2004, 02:33 PM
Hi

I 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

Spudhead
02-05-2004, 03:27 PM
I don't understand what you mean by "repeat regions". But if it's any help - AFAIK, you can't absolutely position table cells. Have you tried doing this with positioned divs; like, working out the top px value in the php then writing a new div for each? Does that make sense?

jakenoble
02-05-2004, 06:19 PM
Repeat regions, its a dreamweaver term.

so that the table wil display all the data, one underneath another rather than just the latest piece of data.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum