View Full Version : self stretching and shrinking graphics

18 Sep 2007, 03:37 PM
I have noticed on some websites that certain graphics resize automatically with the page window size, like header and things on pages. Like if you resize this page horizontally the top menu bar with the home, usercp, faq memberlist...stretches horizontally and all of those buttons are recentered and the bar they sit on resizes dynamically, how do i make a picture do that?


18 Sep 2007, 05:45 PM
Not seeing the actual page in question, I would assume that the image sizes were specified in percentages. If you have an image and you give it a height of 25 pixels and a width of 100% the height will remain constant, regardless of how page elements move about, while the image will expand and contract to be as wide as the other elements allow it to be. If you view the page source of the document that you see this behavior in, you should be able to see how they accomplished the effect.