SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Zealot
    Join Date
    Oct 2009
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    div style stepping on CSS class? I'm lost.

    code below works fine until there are no messages to echo. my CSS "dayboxes" has a hover that that stops working when there is nothing to echo. if there are messages, everything works fine.

    I'm in over my head and need educated please. THANKS!

    <tr>
    <td>
    <div STYLE=" height: 260px; width: 100%; font-size: 13px; overflow: auto;">
    <table border="0" cellpadding="0" cellspacing="1">
    <tr valign="top" bgcolor="#FFFFFF">


    <?php
    // now we write a box of messages

    $class = "dayboxes";
    echo <<<EOD

    <td width="100%" height="150" class="{$class}" ondblclick="javascript:MM_openBrWindow('../messaging/write_email.php','','width=600,height=400');">
    EOD;

    while ($message_array = mysql_fetch_assoc($message_remote))
    {
    $member_id = $message_array['member_id'];
    $subject_text = $message_array['subject_text'];
    $message_text = $message_array['message_text'];
    $created_when = $message_array['created_when'];

    echo $created_when . " " . $subject_text . "<br>";
    echo $message_text . "<br>";
    }
    echo "</td>\n";
    ?>

    </tr>
    </table></div></td>
    </tr>

  2. #2
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi, PHP does us no good here . We would like to have a link to look at taht way we can access your images and make it easier for us to debug since it's already online.

    If you could put up an example test page for us to work with that'd be nice.
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development work

  3. #3
    SitePoint Zealot
    Join Date
    Oct 2009
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by RyanReese View Post
    Hi, PHP does us no good here . We would like to have a link to look at taht way we can access your images and make it easier for us to debug since it's already online.

    If you could put up an example test page for us to work with that'd be nice.
    I'm testing the code on my localhost. it's not online. let me re-phrase the question please. how would you go about this:

    you have a table that displays messages from DB. you want the whole table to "light up" on mouse-over (hover). that highlighting effect kind of prompts the user - "hey, I can double click this". when they do a new window opens containing a form to write more messages.

    the code I have does all of this, except when there are no messages in DB to display. when there are no messages I see no messages, I lose hover effect, and my default background color is gone too. But otherwise I'm very close... but I really don't understand how all this works together and need some advice please. Thank You!

  4. #4
    Community Advisor silver trophybronze trophy
    dresden_phoenix's Avatar
    Join Date
    Jun 2008
    Location
    Madison, WI
    Posts
    2,731
    Mentioned
    31 Post(s)
    Tagged
    0 Thread(s)
    did you want the TABLE, or the CELL to light up? If your css is coded so that you light up the CELL , and your php renders NO CELL when you have no items, then it would lead to what you are describing, as you ensentially have a cell-less table.

  5. #5
    SitePoint Zealot
    Join Date
    Oct 2009
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    sorry Dresden, forgot some key info:

    contents of message display window must scroll too. all was well until I added this line of code right above the table.

    <div STYLE=" height: 260px; width: 100%; font-size: 13px; overflow: auto;">

  6. #6
    SitePoint Zealot
    Join Date
    Oct 2009
    Posts
    134
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by dresden_phoenix View Post
    did you want the TABLE, or the CELL to light up? If your css is coded so that you light up the CELL , and your php renders NO CELL when you have no items, then it would lead to what you are describing, as you ensentially have a cell-less table.
    I want the whole table to light up, and it did until I got cute with the scrolling thing. but I must have it.


Bookmarks

Posting Permissions

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