worldnews — 2013-11-05T17:18:33-05:00 — #1
I want to load a background image into part of the Web page, so that the background image auto resizes to fill the entire space of the cell.
But not the spaces above or below the cell that should have the background image.
A good example is like bing.com
That is I want to have the Top Navigation bar & Footer Navigation bar, to have no background image. But the background image to cover the
entire space of the Table Cell between the Top Navigation bar & Footer Navigation bar.
How does one do this?
ralphm — 2013-11-05T17:52:01-05:00 — #2
It's easy these days, using the background-size property. For example, you can get a background image to cover an element with
However, I don't know if this works on table cells, and I dare say a table is not what you should be using here.
worldnews — 2013-11-05T17:58:40-05:00 — #3
How/Where do I specify the background image file path (src) in above code?
ralphm — 2013-11-05T18:05:24-05:00 — #4
This is the basic setup:
worldnews — 2013-11-05T19:22:10-05:00 — #5
It is working OK.
You can see it here:
ralphm — 2013-11-05T19:25:38-05:00 — #6
Great! I do wish you'd lose the table, though.
worldnews — 2013-11-06T13:47:03-05:00 — #7
Actually I have a follow up question. Well 2 actually.
1- How would one make the background image change every X Seconds by gently sliding to right or left ?
2- How would one upload a new background image by user clicking on a next button? Of course load the new background images without going to the server but have them seamlessly loaded from client side.
paulob — 2013-11-06T15:03:44-05:00 — #8
Are you talking about an image slider?
Something like this perhaps. There are quite a few around.
ralphm — 2013-11-06T17:34:02-05:00 — #9
Yes, as Paul says, there are tons of these around. Most use inline images rather than background images, although that can be changed. Here is one that seems to use bg images out of the box: http://demo.marcofolio.net/bgimg_slideshow/
Still, this is a trickier area, and a gallery like this won't play nicely with tables, I'd think.