views:

268

answers:

1

I'm making a website that has to fit in the entire screen regardless of screen-size. I'm using a table to use this at the moment but I ran into a problem.

The web page is divided into 3 columns: the left column stays at the left of the screen and has a fixed size with a background. the right column stays at the right of the screen and has a fixed size with a background. the middle column should be stretched between his neighbouring cells and should have a background that stretches with it (only horizontally)

This way the web page should always look as it was made for the screen you're using to view the site.

However my problem is the middle cell, the image doesn't repeat, somehow the css code: background-repeat:x-repeat; doesn't make the image stretch, also when I put the cell width on 100% it interferes with his neighbouring cells making it look like a mess.

How can I achieve this?

EDIT

Here is the markup I'm using:

CSS:

#topleftcell
{
    background-image:url(../images/Logo.png);
    background-repeat:no-repeat;
    width:300px;
}
#topmiddlecell
{
    background-image:url(../images/header_fill.png);
    background-repeat:repeat-x;
    width:auto;
}
#toprightcell
{
    background-image:url(../images/header_right.gif);
    background-repeat:no-repeat;
    width:16px;
}

HTML:

<body>
    <table width="100%" border="0" cellpadding="0" cellspacing="0">
 <tr style=" width:100%;">
     <td id="topleftcell"></td>
     <td id="topmiddlecell"></td>
     <td id="toprightcell"></td>
 </tr>
    </table>
</body>
+1  A: 

fixed width on left and right cell. auto width in center cell. you probably need a filler image in the center cell.

Funky Dude
I have a filler image, but how do I get it to fill? It doesn't stretch (or repeat) to fill the entire cell. I have all the cells where I want them to be but I need the image to fill up now.
Pieter888
put <img src='filler.jpg'> inside ur center cell. also set the background to fill.jpg repeat-x
Funky Dude
This worked perfectly thanks. though I'm going to use div elements to make the site-layout, I found that the table had to many restriction for my design to work.
Pieter888