The image underneath will be changing as the product of the week is changed so i will be retrieving this out from a database. I need the text to appear in-front of the image near the bottom. The normal way is to have the image as a background and add some padding.
However this image will constantly change, the image itself is 667*352 but its being cut off for some reason. So how can i accomplish this?
Do you want the text “Product of the week Cherub cardigan £85.00” to sit on top of the image?
If so then wrap the text in a div with a high z-index and place it absolutely at the bottom and it will sit on top of the image. Apply position:relative to the parent (productoftheweek) to create a stacking context.
The image is cut off because the height of the text and the height of the image is greater than the height you set for that element and you hid the overflow. If you are going to absolutely place the text then it should slide up and fit the space you have already allocated.
You can’t put a foreground image behind the elements background. You could just swap the images around and have the picture of the man as the background and then absolutely place the transparent image on top as before.
That image doesn’t seem to be transparent though?
If you want the picture of the man to be an image in the html then you will need to add an element to place the other image on and then position it.
e.g.
That doesn’t seen to be working, the image of the man should be infront of the background, once it’s infront the top and bottom gray area will be transparent… like the image i attached…
Or can this not be done? The reason i have the image as such is because it will again constantly be changing every week so it’s essential i can read this image out of a database.
How can the image of the man be in front of the image that you want to sit on top of it?
This image needs to be made transparent and then the image of the man which is underneath will show through and allow you to have different images there as required.