Forum Moderators: open
I'm wondering is there any way to set a background image's relative width and height? I have an iframe in the middle of my page that is set on a certain % width and height and I want the background image of the cell that the iframe is in to have the same dimensions. The iframe is set on transparent so that the cell's background image shows through to the iframe. I'm not sure if it's possible, but could I set a regular image with those dimensions and then somehow place the iframe right on top of the image? Or, does anyone have any suggestions of alternate ways to achieve this? Thanks so much ...
____________________________________
Is there a way to put things like a table or text over top of an IMG SRC image?
Yes, with CSS.
Use the z-axis and absolute positioning for 2 divs, giving each one a unique id ("#"). You can place one div over top of the other in the exact same spot. Then, in your bottom div you can use the browser to re-size the image right in the <img> tag.
However, you said you have thousands of background images. Are they all the same dimensions, or at least do they fall into only handful of sizes? If not, writing code that figures out what the doubled dimensions are will also be a challenge.
...set the size of the table using table width and td height
Browsers "may" take those settings into account as suggestions, but the final size when the table and cells are actually rendered will still vary according to several other factors. That's what makes this approach so daunting.
____________________________________
I have no idea how to use CSS though, but I think I can catch on pretty quickly. Would it be possible to show me an example of a page as described above so I could just modify it?
____________________________________
Is there a way to put things like a table or text over top of an IMG SRC image?
Yes, with CSS.
Use the z-axis and absolute positioning for 2 divs, giving each one a unique id ("#"). You can place one div over top of the other in the exact same spot. Then, in your bottom div you can use the browser to re-size the image right in the <img> tag.
____________________________________
I've tried a bit but I didn't see anything in the tutorial about the z-axis and I'm still not quite sure what to do. Thanks so much ...