imageblock.External-Syntax or CSS for Grid?

zi94sm65

Joined: 2006-07-25
Posts: 38
Posted: Fri, 2007-07-20 21:30

I'm trying to embed a call to gallery2 on a php web-page to display a 2X2 grid showing 4 thumbnails of the most recently added images.

I have found the code:

Quote:
< ? php @readfile('http://www.mysite.com/gallery/main.php?g2_view=imageblock.External&g2_blocks=recentImage|recentImage|recentImage|recentImage&g2_show=none&g2_maxSize=50'); ? >

To get the 4 most recent images but cannot figure out how to get it to display in a grid pattern. Is there some syntax i am missing to get it to do this? Or can it only be done with CSS? Or it cannot be done at all using the method above?

Any syntax help or css suggestions would be appreciated....

 
zi94sm65

Joined: 2006-07-25
Posts: 38
Posted: Sat, 2007-07-21 19:39

Somebody kindly sent me the following code and CSS (adapted from that found at www.steffensenfamily.com) to get 4 recent images in a 2x2 square grid and i thought i'd share it for anybody else that might stumble across this thread in the future. It worked for me.... If anybody ever finds a better way to do this, please post it.
CODE:

Quote:
<div id="sidebar-box">
<div id="sidebar">

<div class="imageblock">
<h2>Recently Added Images</h2>
<div class="one-image">
<?php @readfile('http://www.yoursite.com/path-to-gallery2/main.php?g2_view=imageblock.External&g2_blocks=recentImage|recentImage|recentImage|recentImage&g2_show=none&g2_maxSize=75'); ?>
</div>
</div>

</div>
</div>

CSS:

Quote:
#sidebar-box
{
width:194px;
float:right;
margin: 15px 33px 0px 50px;
padding:0;
font-size:1em;
}

#sidebar
{
margin:8px 8px 8px 0px;
padding:0;
font-size:1em;
}

#sidebar h2
{
margin: 5px 0px 0px 0px;
padding:0px 0px 0px 0px;
font-size: 1em;
color: #999;
text-align:center;
height:14px;
font-weight:bold;
}

#sidebar .imageblock
{
padding: 0px 1px 18px 1px;
margin: 10px 0px 0px 0px;
border: none;
}

#sidebar .imageblock h2
{
margin: 5px 0 0 0;
padding: 0;
}

#sidebar .one-image
{
margin: 0px 0px 4px 4px;
padding: 0;
float:left;
display: inline;
}

#sidebar a .giThumbnail {
border:none;
}

#sidebar .clear-both
{
clear: both;
}