PDA

View Full Version : Dynamic size - border image



krazycat
27 Mar 2011, 04:43 AM
My client want to have an irregular border (the border is an image) wrapped around the content on her webbsite. The content is places inside a scrollable box, which will change size depending of the contents size and the users browser. My problem is how the border will adjust the size depending of the box size.

I figured out some soloutions:

Place the border image as a background image inside the box, and adjust the size of the image to the box size. The width of the box will be adjusted depending of the users browser size and the height depends of the box content. The problem is that if the box is disproportionate (very wide or very high), the image will also, and that would look ugly.

Another souloution would be to cut the borders sides apart and "paste" them into a table, but it is a pretty big chance that the pieces wouldn't fit together.

Or I could do the border image extremly high without a bottom, justify the image only depending of the box width and hide the overflow at the bottom. It wouldn't be perfect, but hopefuly it won't skew to much for the eye. Problems that could appear with this soloution is that the content some times could be higher then the border image + that the border never will have a bottom, which deviate from the clients wishes.

Somebpdy have a better soloution?