Jump to content

Displaying Image Problem


MoFish

Recommended Posts

hello all, im having a slight problem with my gallery and cant seem to figure out exactly what its doing. It sometimes displays one slightly funki with the image uploaders name to the side of the image instead of below. if i then click refresh it corrects itself and displays normall again. you can preview my problem here [a href=\"http://www.risingsuncarshow.co.uk/index.php?page=viewgallery&category=2005&start=0\" target=\"_blank\"]CLICK HERE TOO SEE PROBLEM[/a]. if you click nextpage, you will see what I mean. Why would it be doing that?

thanks again, mofish

below is the code i use to display my images.

[b]page[/b]
[code]            
echo "<div class='gallery'>";

// we need to do a while statement to loop through the database picking out

// all the content what equals our query

while ($myrowimage = mysql_fetch_array($imageresult) ) {     

    //assign the values from the database to variables to be used in displaying.

        $image = $myrowimage["image"];

        $name = $myrowimage["author"];


        //display the images, asssign links and print the name of the image uploader    

            echo "<a class='pic' href='gallery/$image' target='_blank'>
                <img src='gallery/tn_$image' />
                <div style='padding-top:4px'>Uploaded By <b>$name</b></div>
                </a>";

    }

    // run the clearer

    echo "<div class='clearer'> </div>";

    // close the gallery div which holds all the images.

    echo "</div>";
[/code]

[b]style[/b]
[code]
.pic{
        height:175px;
        width:170px;
        float:left;
        padding:15px;
        margin:5px;
        text-align:center;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: x-small;
        display:block;
}
.gallery{
        width:100%;
        font-family: Verdana, Arial, Helvetica, sans-serif;
        font-size: x-small;
        text-align:center;
        display:block;
}
.clearer {
        clear: both;
        line-height: 0em;
}
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.