close ad
WARNING: Do Not Install the DREAMWEAVER CC 2017 Update »
open ad
View Menu

Technical Support Forums

Free, outstanding support from WebAssist and your colleagues

rating

how to show image overlay with php

Thread began 5/21/2010 9:53 pm by mpirani286201 | Last modified 5/22/2010 3:45 am by anonymous | 734 views | 1 replies |

mpirani286201

how to show image overlay with php

I have a real estate site and I want to show a sold or under contract over the image when a tick box is selected in the admin.
How do I do this? I realize its both php and CSS any help..

Sign in to reply to this post

anonymous

while there is some complexity here, I will try to get you pointed in the right direction.

First, yes you will need PHP to determine if the check box/database was updated with the check.

The basics would be to add a column in the database for sold. I would make the default entry "0" and then if you were to check the box, it would update the database to be "1". In other words, 0 meaning not sold and 1 meaning sold.

In your page, say you have a picture of your house in a div.

<div>Picture</div>

Below that you can then add your if statement.

Use PHP to check if the value for sold in that row is 1. If it is equal to 1, then you generate a new div with your sold graphic in that.

Lastly, you will want to set the position of that div to relative and preferably to the exact dimensions of your image. You will need to then set the Z-Index attribute high (like 100) and then begin to position the div with negative margins to show up over top the house pic.

For example, to get over the bottom right corner, you may have to set it to margin-top: -120px; margin-left: 50px;. That's just an arbitrary example of how a picture that was say 100px high would be placed.

Regards

Sign in to reply to this post

Build websites with a little help from your friends

Your friends over here at WebAssist! These Dreamweaver extensions will assist you in building unlimited, custom websites.

Build websites from already-built web applications

These out-of-the-box solutions provide you proven, tested applications that can be up and running now.  Build a store, a gallery, or a web-based email solution.

Want your website pre-built and hosted?

Close Windowclose

Rate your experience or provide feedback on this page

Account or customer service questions?
Please user our contact form.

Need technical support?
Please visit support to ask a question

Content

rating

Layout

rating

Ease of use

rating

security code refresh image

We do not respond to comments submitted from this page directly, but we do read and analyze any feedback and will use it to help make your experience better in the future.

Close Windowclose

We were unable to retrieve the attached file

Close Windowclose

Attach and remove files

add attachmentAdd attachment
Close Windowclose

Enter the URL you would like to link to in your post

Close Windowclose

This is how you use right click RTF editing

Enable right click RTF editing option allows you to add html markup into your tutorial such as images, bulleted lists, files and more...

-- click to close --

Uploading file...