#1
  1. Getting better 1 line @ a time
    Devshed Beginner (1000 - 1499 posts)

    Join Date
    Feb 2004
    Location
    Sheffield
    Posts
    1,013
    Rep Power
    33

    CSS and repeat regions


    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. #2
  3. Thanks Johnny Hart (BC) R.I.P.

    Join Date
    May 2003
    Location
    Dallas
    Posts
    5,268
    Rep Power
    1955
    Make your positioning static, the default.

    Delete "position: absolute;"

    cheers,

    gary
    There are those who manage to build a web site without knowing what they're doing; thereby proving to themselves they do, indeed, know what they're doing.

    My html and css workshop, demos and tutorials.
    Ask a better question, get a better answer.

IMN logo majestic logo threadwatch logo seochat tools logo