timmah1 Posted January 11, 2008 Share Posted January 11, 2008 Hi, I would like to know the easiest way to display an image from the database, and when you roll the mouse over it, it displays some info about the photo. An example of what I'm trying to do is this: http://www.lambogenie.co.uk/self-drive-car-hire.html Is there an easy way to do this? Thanks in advance Quote Link to comment Share on other sites More sharing options...
interpim Posted January 11, 2008 Share Posted January 11, 2008 storing images in a database is not the best way to go about things... You might do better storing the images in a folder and using the database to hold the address and info you want displayed... simple alt text for the images will work for you im sure. Quote Link to comment Share on other sites More sharing options...
timmah1 Posted January 11, 2008 Author Share Posted January 11, 2008 ok, maybe I wasn't too clear. The images are not stored in the database, the file name is. I want to display the image, but when I rollover the image, I want info about that picture to show up underneath it without throwing off the design, pretty much a float, but I'm not sure how to go about doing this. Quote Link to comment Share on other sites More sharing options...
interpim Posted January 11, 2008 Share Posted January 11, 2008 Im thinking you could do that with CSS or Javascript... use your database to store information on each image you want, and build your code to show your description. Quote Link to comment Share on other sites More sharing options...
chronister Posted January 11, 2008 Share Posted January 11, 2008 Self Drive car does it like this. onmouseover="document.getElementById('product_id0').className='product productOn';" onmouseout="document.getElementById('product_id0').className='product';" these change styles for the element.... then take a look at this css http://www.lambogenie.co.uk/common/styles-screen.css About 2/3 the way down the page you will find this .productOn { background: #ffab00; } .productOn .productPreview { display: block; width: 201px;/*181+10+10*/ margin: 0 0 35px 0; padding: 0 0 10px 0; position: absolute; z-index: 10002; background: #ffab00; } .productOn .productImage a { background: none; } .productOn .productTitle a { color: #120c00 !important; } .productOn .productTitle a span { border: none; } .productOn .productDescription { color: #4a3300; } So it looks like this is a mostly CSS based solution with a tiny bit of JS to change the styles based on mouseover or mouseout Nate Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.