Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-05-07 11:32:37

fangonk
Member
Registered: 2007-07-12
Posts: 44

image_index and classes for individual thumbnails.

I did my best to search the forum for a solution to this but I have exhausted myself and it seems the textpattern forums as well.

I’m trying to develop a really simple photo gallery based on the technique found here: http://textpattern.com/faq/138/can-i-make-an-image-gallery

In the end, I want to create a grid of thumbnails with 4 or 5 in each horizontal row. In addition to this, I want to put one of those chessy little grey borders around each thumbnail. However the image_index tag doesn’t allow the user to add a class tag to individual thumbnails. I have tried adding the border using li in the break tag and ul in the wraptag, but when I try to use display:inline (to get them to lay horizontal) its screws up the borders.

Here take a look:

.image_index {

list-style-type: none;

}

.image_index li {

display: inline;

margin-right: 20px;

padding: 2px;

border-width: 1px;

border-color: #cccccc;

border-style: solid;

}

And the html:

<div id =“archivet1”>
<txp:image_index wraptag=“ul” break=“li”/>
<txp:image_display />
</div>

Any ideas on how I can get them to lay horizontal and apply a border at the same time?

Last edited by fangonk (2008-05-07 11:33:34)

Offline

#2 2008-05-08 16:14:17

thebombsite
Archived Plugin Author
From: Exmouth, England
Registered: 2004-08-24
Posts: 3,251
Website

Re: image_index and classes for individual thumbnails.

Without seeing the “live” site it’s a bit awkward but have you tried applying the border and padding directly to the images like so “.image_index li img {}” then just keep the “display” and “margin” for the “li”?


Stuart

In a Time of Universal Deceit
Telling the Truth is Revolutionary.

Offline

#3 2008-05-19 08:03:50

fangonk
Member
Registered: 2007-07-12
Posts: 44

Re: image_index and classes for individual thumbnails.

I applied the class directly to the images and it worked out really well. Thanks.

Offline

Board footer

Powered by FluxBB