Jump to content

Photo grid not styling right with wookmark and php


Recommended Posts

Hi I am trying to create a grid like gallery and for some reason it does not look right? I want it to look like pinterest so I am trying to use wookmark jquery. Here is my code and an image to view. Thank you.

Here is the css:

#gallerycontainer {
display: inline-block;
background-color: #f0f0f0;
padding: 0px;
/*border: 1px solid #DBDBDB;
-webkit-box-shadow: #E4E4E4 0px 0px 5px;
-moz-box-shadow: #E4E4E4 0px 0px 5px;
box-shadow:#E4E4E4 0px 0px 5px;*/
float: left;
padding-right: 0px;
margin-left: 10px;
overflow: auto;



#gallery li img {
float: left;

border: 5px solid #fff;

-webkit-transition: box-shadow 0.5s ease;
-moz-transition: box-shadow 0.5s ease;
-o-transition: box-shadow 0.5s ease;
-ms-transition: box-shadow 0.5s ease;
transition: box-shadow 0.5s ease;

border: 2px solid #fff;
padding-bottom: 40px;
float: left;
background: white;

#gallery li img:hover {
-webkit-box-shadow: 0px 0px 7px rgba(255,255,255,0.9);
box-shadow: 0px 0px 7px rgba(255,255,255,0.9);
cursor: pointer;
text-align: center;

And here is the php and html.

<script type="text/javascript" src="js/jquery.wookmark.js"></script>
<script type="text/javascript">$('#gallery li').wookmark();</script>
<div class="myaccounttitle">My Images</div>
<div id="gallery">

function pictures($query)
while($row = mysql_fetch_array($query))
$id = $row['id'];
$title = $row['title'];
$author = $row['userid'];
$date = date("F j, Y, g:i a", $row['date']);
$picture = $row['picture'];
// $likes = $row['likes'];
// $favs = $row['favs'];
$unique = mysql_num_rows(mysql_query("SELECT * FROM views WHERE picture='$id' GROUP BY ip"));
<div class="galleryinfo">
<li id="<?php print $id?>">
<a class="fancybox" rel="group" href="photos/<?php print $picture?>"><img src="photos/<?php print $picture?>"/></a>
Views : <?php print($unique) ?>

<div id="gallerycontainer">
if($account == "c") {
}else {

All of your help is greatly appreciated.

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.

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.