Jump to content

Add sold sign to car image


Skippie113

Recommended Posts

Good day,

 

I am doing a website for a second hand car dealer. The dealer can upload his own car images and description to a SQL database. When a customer opens the showroom.php page the car descriptions and images are pulled from the database into a table. My problem is as follows:

 

When they sell a vehicle they want the image to have a sold sign on it. I added the sold sign to the database but it appears on top of the main page and not on the car image that was sold.

 

Any suggestions how to fix this.

 

Stefan

Link to comment
Share on other sites

You read the database and load it into the page. As you load the information into the page you would enable an overlay image for any car that the database says is sold. The overlay image would have a higher z-index than the car image and would be positioned on top of it. If the car is not sold the overlay image would be set to display:none;

 

http://www.w3schools.com/css/css_positioning.asp

http://www.w3schools.com/cssref/pr_pos_z-index.asp

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...