Results 1 to 7 of 7

Thread: Image height not working in firefox

  1. #1
    Join Date
    Sep 2008
    Posts
    77
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default Image height not working in firefox

    Hey guys for some reason the image height isn't get adjusted in firefox and my img.js isn't working on any browser...

    PHP Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" 
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
    <head>
    <title>1013MM: Photography by John Zhang</title>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta name="description" content="1013MM: A photography portfolio by John Zhang, a freelance photographer currently available for projects in the Los Angeles area." />
    <meta name="keywords" content="photography, portfolio, cameras, photo, dslr, nikon, freelance, los angeles, socal, southern california, la, john zhang, portrait, events" />
    <meta name="robots" content="all,index,follow" />

    <link rel="shortcut icon" href="images/favicon.ico">
    <style>
    html {
        padding:;
    }
    body {
        background:#000000 url('images/load.gif') no-repeat center center;
    *** padding:0;
    *** margin:0;
    }
    img {
        border:0;
    }
    #container {
        padding-top:-4px;
        padding-left:-7px;
        margin-top:-4px;
        margin-left:-7px;
    }
    #container img {
        margin-top:-4px;
    }
    a:active, a:focus {
        outline: 0;
    }
    </style>

    <link rel="stylesheet" type="text/css" href="css/highslide.css" />
    <script type="text/javascript" src="js/highslide.php"></script>
    <script type="text/javascript" src="js/img.php"></script>

    <script type="text/javascript">
    hs.graphicsDir = 'graphics/';
    hs.outlineType = 'rounded-black';
    hs.outlineWhileAnimating = true;
    </script>

        
    </head>

    <body>
        
    <div id="container" width="100%">
    <div width="100%">
    <a href="info.php" class='highslide' onclick='return hs.expand(this)'><img src="images/logo.png" height='6%'/></a>
    <?php 
    $dirname 
    "./thumb"
    $images scandir($dirname); 
    $ignore = Array(".""..""error_log");
    foreach(
    $images as $curimg){
    if(!
    in_array($curimg$ignore)) {
    echo 
    "<a href='./full/$curimg'  class='highslide' onclick='return hs.expand(this)'><img src='./thumb/$curimg' height='6%' /></a>";
    }; 
    } * 
    ?> 
    </div>
    <div width="100%">
    <a href="info.php" class='highslide' onclick='return hs.expand(this)'><img src="images/logo.png" height="6%"/></a>
    <?php 
    $dirname 
    "./thumb"
    $images scandir($dirname); 
    $ignore = Array(".""..""error_log");
    foreach(
    $images as $curimg){
    if(!
    in_array($curimg$ignore)) {
    echo 
    "<a href='./full/$curimg'  class='highslide' onclick='return hs.expand(this)'><img src='./thumb/$curimg' height='6%' /></a>";
    }; 
    } * 
    ?> 
    </div>
    </div>
    </body>
    </html>
    Working link is here to see....

    And i know i could just resize all my image heights, but I want to have that size just in case and make them future proof... and fixed height will mess up on small browser resolutions... The script that doesn't work is a fade in image script.

    Thanks!
    Last edited by jzhang1013; 08-30-2009 at 11:37 PM.

  2. #2
    Join Date
    May 2007
    Location
    Boston,ma
    Posts
    2,127
    Thanks
    173
    Thanked 207 Times in 205 Posts

    Default

    Try switching your image tags around like this:

    <img src="./thumb/$curimg" style="height:6%;" />

  3. #3
    Join Date
    Sep 2008
    Posts
    77
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    a px height will work but why not a % size in FF???

  4. #4
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    557
    Thanks
    8
    Thanked 66 Times in 66 Posts

    Default

    Well, bc it's not valid html. FF uses valid content, unlike ie which is liberal [which is a bad thing]
    - Josh

  5. #5
    Join Date
    Sep 2008
    Posts
    77
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by JShor View Post
    Well, bc it's not valid html. FF uses valid content, unlike ie which is liberal [which is a bad thing]
    so whats a fix? it works in safari and chrome....

  6. #6
    Join Date
    Mar 2007
    Location
    New York, NY
    Posts
    557
    Thanks
    8
    Thanked 66 Times in 66 Posts

    Default

    Well, the percent won't work. period. there's no way to get a percentage width, and expect it to work on all browsers.

    Can you try making it a fixed width?
    - Josh

  7. #7
    Join Date
    Sep 2008
    Posts
    77
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by JShor View Post
    Well, the percent won't work. period. there's no way to get a percentage width, and expect it to work on all browsers.

    Can you try making it a fixed width?
    stupid me i messed up the div coding it works fine now.

    But the main problem now is the img.php script wont work. it's supposed to delay the display of images so that they each fade in but it doesnt work for some reason. why is this?

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
  •