SitePoint Sponsor

User Tag List

Results 1 to 6 of 6
  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    pa
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    IE browser problem

    Can someone help please. I just spent a lot of time getting the menu to look "right" in IE on the pc (when on other browsers it is right). Now I cannot figure out this problem. You can see the problem here...
    http://www.lazerpro.com/projects/apa...ings.php?cid=1

    The grey div layer box doesn't close on the right side. It does everywhere else and in other browsers and on the mac IE, but not the pc.

    Please forgive my use of tables, I am still learning and hope someday soon to make the leap to all CSS. I absolutely love it. But IE drives me crazy and wastes my time. Any Help is appreciated.

    peace
    Summer

    #resultsEntryGrey {
    border: 1px dotted #666;
    background-color: #F1F1F1;
    color: #666;
    padding:5px;
    text-align: center;
    }


    <table width="625" cellpadding="0" cellspacing="0" border="0" align="center">
    <tr>
    <td bgcolor="#ffffff">
    <div id="resultsEntryGrey">
    <table cellpadding="5" cellspacing="0" border="0" width="100%">
    <tr>
    <td valign="top" rowspan="2"><a href="listing_detail.php?listing_id=<?php echo $listing_id[$i]; ?>">
    <?php if( ($image_thumb[$i] == "gif") or ($image_thumb[$i] == "jpg") or ($image_thumb[$i] == "png") ){
    $image_file = "./images/listings/" . $listing_id[$i] . "_thumb." . $image_thumb[$i];
    $size = getimagesize($image_file);
    $width = $size[0];
    $height = $size[1];
    #if($width > 80){ $width = 80; }
    #if($height > 80){ $height = 80; }
    ?>
    <img src="<?php echo $image_file; ?>" border="1" width="175" alt="">
    <?php }else{
    $image_file = "./images/listings/default_thumb.gif";
    $size = getimagesize($image_file);
    $width = $size[0];
    $height = $size[1];
    ?>
    <img src="<?php echo $image_file; ?>" border="1" width="<?php echo $width; ?>" height="<?php echo $height; ?>" alt="No Photo Available">
    <?php } ?>
    </a></td>
    <td valign="top" class="body"><?php echo $address[$i]."<br>".$city[$i]; ?></td>
    <td valign="top" class="body">
    <div id="resultsMenu">
    <ul>
    <?php if( $extra_images[$i] > 0){ ?>
    <script language="JavaScript">
    <!----
    function display_photos(listing_id){
    var ses="photos_display.php?listing_id="+listing_id;
    var blah=window.open(ses,'photos','toolbars=0,menu=0,directories=0,width=600,height=600,scrollbars=1,resizable=yes');
    }
    //--->
    </script>

    <li><a href="javascript:display_photos(<?php echo $listing_id[$i]; ?>)">More Photos </a></li>
    <?php } ?>
    <li><a href="listing_detail.php?listing_id=<?php echo $listing_id[$i]; ?>">More Details </a></li>
    <?php if( $extra_ipix[$i] > 0){ ?>
    <script language="JavaScript">
    <!--
    function display_tours(listing_id){
    var ses="./tour_display.php?listing_id="+listing_id;
    var blah=window.open(ses,'tours','toolbars=0,menu=0,directories=0,width=650,height=350,scrollbars=1,resizable=yes');
    }
    //-->
    </script>
    <li><a href="javascript:display_tours(<?php echo $listing_id[$i]; ?>)">Virtual Tour </a></li><?php } ?></ul></div></td>
    </tr>
    </table></div></td>
    </tr>
    </table>

  2. #2
    Google Engineer polvero's Avatar
    Join Date
    Oct 2003
    Location
    Mountain View
    Posts
    567
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    check the margin on <ul>
    might have some luck there.

  3. #3
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,803
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Hi,

    Add this hack which should force the border to display.
    Code:
    #resultsEntryGrey {
     border: 1px dotted #666;
     background-color: #F1F1F1;
     color: #666;
     padding:5px;
     text-align: center;
    }
    /* commented backslash mac hiding hack  \*/ 
    * html #resultsEntryGrey {height:1%}/*for ie only*/ 
    /* end hack */
    Paul

  4. #4
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    pa
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thank you Paul.
    That worked perfectly!

    Why it worked and how it was figured out is beyond me, but thanks for your help.

    peace

  5. #5
    The CSS Clinic is open silver trophybronze trophy
    Paul O'B's Avatar
    Join Date
    Jan 2003
    Location
    Hampshire UK
    Posts
    39,803
    Mentioned
    158 Post(s)
    Tagged
    4 Thread(s)
    Why it worked and how it was figured out is beyond me,
    Well the answer is quite simple in that ie has trouble remembering how big elements are when there is no specific width or height. Using the height:1% hack seems to force ie to work out the dimensions correctly and everything gets displayed properly.

    Of course it needs to be hidden from other browsers etc.

    Paul

  6. #6
    SitePoint Enthusiast
    Join Date
    Sep 2003
    Location
    pa
    Posts
    79
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Paul O'B
    Well the answer is quite simple in that ie has trouble remembering how big elements are when there is no specific width or height. Using the height:1% hack seems to force ie to work out the dimensions correctly and everything gets displayed properly.

    Of course it needs to be hidden from other browsers etc.

    Paul
    Thanks also for the explanation. That will definitely help in the future.


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
  •