Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts

    CSS and Repeat Region

    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

  • #2
    Senior Coder Spudhead's Avatar
    Join Date
    Jun 2002
    Location
    London, UK
    Posts
    1,856
    Thanks
    8
    Thanked 110 Times in 109 Posts
    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?

  • #3
    Regular Coder
    Join Date
    Feb 2004
    Location
    UK, derby
    Posts
    142
    Thanks
    0
    Thanked 0 Times in 0 Posts
    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.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •