SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table expanding to width of parent cell; not wanted

    Alright, I'm trying to add a border around an image using cellpadding (I'm doing it on other parts of the page just fine); here is a picture of what I am having trouble with:

    http://www.element87.com/error/error1.gif

    As you can see, the table with the cellpadding is expanding to the width of the cell it is nested in (width of 200).

    Here is the code I'm using for this part of the page:

    Code:
    <TD align="center">
    <table width="150" cellpadding="1" cellspacing="0"><tr><td class="border">
    <?php
    
    $count = 0;
    $dp = opendir("preview");
     if(!$dp)
     {
       die("Cannot open images dir");
     }
     while($file = readdir($dp))
     {
       if($file!="." && $file!="..")
       {
         $count++;
       }
     }
    echo "<a href=\"javascript:popUp('gallery/image$count.html')\"><img src=\"preview/" . preview . $count . ".gif\" border=\"0\" alt=\"Latest Gallery Piece\" style='filter:alpha(opacity=50)' onmouseover='nereidFade(this,100,100,100)' onmouseout='nereidFade(this,50,50,50)'></a>";
    
    ?>
    </td></tr></table>
    </TD>
    Any help would be greatly appreciated.

  2. #2
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Whoops sorry; I fixed the 404 problem.

  3. #3
    SitePoint Zealot
    Join Date
    Mar 2002
    Location
    United States
    Posts
    193
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I'm with stupid; figured it out on my own.


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
  •