Click to See Complete Forum and Search --> : Borders


Lotus
09-13-2003, 11:57 AM
You've probably all seen it - in forums and advanced pages, you will see that spacer images, borders etc. stretch to fill the screen if you close the "favourites" box or change the screen resolution. Now I just wonder how I can do this. I have an image about 1x30 pixels, and I want it to stretch along the screen. Still; I want it to be a 30 pixel space between each of the edges. And when I somehow make the screen bigger, I want that border to stretch to fill its new size but STILL have the 30 pixel space from both of the edges.

And last, but it's not as important as above; how do I give this image an overlay text that stays in the center of it regardless of size?

I strongly appreciate all input.

Jona
09-13-2003, 08:58 PM
It's all in percentages. Make the image the background-image of a DIV, and use CSS to position the DIV absolutely on the page, and set its width to a certain percentage (try 80%). When you open the favorites menu to the left (in IE), it should "shrink to fit," and when you close the favorites menu, it should "grow to fit." To align the text, just put <span style="text-align:center;">Text</span> inside of your DIV. That should do the trick...

[J]ona

pyro
09-13-2003, 10:38 PM
Why was this posted in the PHP forums? I'll move it to HTML...