Hi,

I need my header to consist of five parts:
  • Two fixed-width images on the left and right side
  • A fixed-width image in the middle, centered
  • Two dynamic width images between these, to fill the gaps


Here's a schematic representation of what I want:

The red and blue parts are fixed, the green parts are there just to fill the gaps between the red and blue parts when the header is resized. The blue part in the middle should stay centered.

The image in the green parts of course tiles horizontally so that it can be repeated indefinitely.


How can I achieve this?

So far I got this:
css Code:
  1. .title_left
  2. {
  3.     float: left;
  4.     width: 250px;
  5.     height: 126px;
  6.     background: url('../Images/header_left.jpg')
  7. }
  8.  
  9. .title_right
  10. {
  11.     width: 250px;
  12.     height: 126px;
  13.     background: url('../Images/header_right.jpg')
  14. }
  15.  
  16. .title_middle
  17. {
  18.     width: 400px;
  19.     height: 126px;
  20.     background: url('../Images/header_middle.jpg')
  21. }
  22.  
  23. .title_fill   /* green parts */
  24. {
  25.     width: ???;  /* (auto doesn't work) */
  26.     height: 126px;
  27.     background: url('../Images/header_fill.jpg')
  28. }

I've tried a few variations, having float: left and right on various styles, but nothing gives me what I want... The biggest problem is that the fill parts (green parts) are stretched toward the end of the page (width: auto) and not toward the next image, so that the next image is pushed down...

Thanks!