Hello,
I have a script that is pulling images in via php as the background cell in a table. I was wondering, is there a way to use CSS to make that cell always a link? Also, can I make it so it always has an alt tag. The php randomly picks between about 10 pictures, and then I use
<tr height="100"><td width="670" style="background: url('../rotatingpix/top/rotate.php') no-repeat center center;"> </td></tr>
to pull it in. Any suggestions on how to do something in the stylesheet that would pull that image in and make whichever it picks go to another page.
Thank you in advance,
JoeYou're talking about three completely separate entities: Server side scripting, HTML and CSS.
PHP can serve your browser HTML or CSS, and even images. How about something like this:
.randomBG {
background: transparent url(/randomImage.php) no-repeat scroll 0 0;
}
Then in your HTML:
...
<tr class="randomBG">
...
</tr>
Now as for the link? Hm. Not sure what you want there. If you want to link the image, use the <img> element instead, and surround it with the <a> element.
I have a script that is pulling images in via php as the background cell in a table. I was wondering, is there a way to use CSS to make that cell always a link? Also, can I make it so it always has an alt tag. The php randomly picks between about 10 pictures, and then I use
<tr height="100"><td width="670" style="background: url('../rotatingpix/top/rotate.php') no-repeat center center;"> </td></tr>
to pull it in. Any suggestions on how to do something in the stylesheet that would pull that image in and make whichever it picks go to another page.
Thank you in advance,
JoeYou're talking about three completely separate entities: Server side scripting, HTML and CSS.
PHP can serve your browser HTML or CSS, and even images. How about something like this:
.randomBG {
background: transparent url(/randomImage.php) no-repeat scroll 0 0;
}
Then in your HTML:
...
<tr class="randomBG">
...
</tr>
Now as for the link? Hm. Not sure what you want there. If you want to link the image, use the <img> element instead, and surround it with the <a> element.