Skip to main content
Participating Frequently
October 28, 2008
Question

Need advice/idea about Image gallery

  • October 28, 2008
  • 1 reply
  • 361 views
Hello to ALL!!!
I'm trying to make an dynamic image gallery WITH!!! some active buttons above (for example: BUTTON1 with function "delete" and BUTTON2 with function "update") a picture and some "dataoutput" below (for example:Price). So, separate cell must look like:
BUTTON1 BUTTON2
<Image>
PRICE
For implementation this task I have:
1) mySQL database "gallery" with table "test" and columns "Id", "path to image", "Price"
2) 2 gifs: BUTTON1, BUTTON2
Before my first trying I thought that it's simple, and I've tried:
<!---action page---->
<cfquery name="qTest" datasource="gallery">
SELECT * FROM test
</cfquery>

<div id=imagecont>
<cfoutput>
<cfloop query="qTest">
<img src="../Button1.gif />
<img src="../Button2.gif /><br>
<img src="#qTest.path to image#" />
<p>#qTest.Price#</p>
</cfloop>
</cfoutput>
</div>
And it worked normal. BUT!!! Looping had a vertical direction! And any CSS rules that I've applied to DIV "imagecont" (weight, height) hadn't any effect.
So, what I've get:
I see all necessary information (on browser), but I don't know, how to format it with my dreaweawer cs3 and CSS.
And I afraid that I've chosen a "wrong method" (I mean my code above)
Please, give me some recommendations or advices.
How can i archive my needs?
How to use CSS in div tag, which includes <cfloop> code. I've also tried to use CSS with structure like:
<div id=a>
<cfoutput>
<cfloop >
<div id=b>
DATA
</div>
</cfloop>
</cfoutput>
</div>
But (div a)'s CSS rule HEIGHT take's no effect on <div id=b> :(
And what about useful technique for displaying " action buttons" above each image in dynamic image gallery???
Great THANKS for your answers/comments!!!!
    This topic has been closed for replies.

    1 reply

    Inspiring
    October 28, 2008
    the css attribute you are looking for is FLOAT.

    see if something like http://www.photos-of-laos.org/top-rated.cfm is
    what you are after in general images layout terms. feel free to check
    the generated html :).

    re general css knowledge i highly recommend the book "Bulletproof CSS"
    by Mark Grabinski.

    re the 2 buttons above the image: consider turning them into css image
    overlays instead (when the buttons appear OVER [not above] the image
    only when a user mouses over) - it looks much better that way.

    hth

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/