The problem is, i have a background in two parts.
Background Image #1
Background Image Repeats (endlessly) #1
Background Image #2
Background Image Repeats (endlessly) #2
In css you cant create a background by just sticking elements on it like so:
#leftColumn {
background-image:url('http://i53.tinypic.com/2ezlb7n.png');
background-repeat:no-repeat;
background-position:right top;
background-z-index:1;
background-image:url('repeat.png');
background-repeat:repeat-x;
background-z-index:0;
}
What I want the result to be:
[ BACKGROUND LEFT ]
[ CONTENT ]
[ BACKGROUND RIGHT ]
The content should always be 768px. The background on both sides should show as much as possible.
I can't believe it, but i was able to solve it myself. This is the code that made it possible:
<style type="text/css">
* {
padding:0px;
margin:0px;
}
html, body {
width:100%;
height:100%;
background-color:#333333;
}
#leftColumn {
background-image:url('http://i54.tinypic.com/aa83lw.png');
background-repeat:repeat-x;
display:none;
}
#rightColumn {
background-image:url('http://i52.tinypic.com/kcjdwi.png');
background-repeat:repeat-x;
display:none;
}
#leftImage {
background-image:url('http://i53.tinypic.com/2ezlb7n.png');
background-repeat:no-repeat;
background-position:right;
width:100%;
height:128px;
}
#rightImage {
background-image:url('http://i56.tinypic.com/noh6on.png');
background-repeat:no-repeat;
width:100%;
height:128px;
}
#content {
width:768px;
background-color:#666666;
}
@media only screen and (min-width:769px) {
#leftColumn, #rightColumn {
display:table-cell;
}
}
</style>
<table width="100%" height="100%">
<tr>
<td id="leftColumn" align="right"><div id="leftImage"></div></td>
<td id="content"> </td>
<td id="rightColumn" align="left"><div id="rightImage"></div></td>
</tr>
</table>
horizontalpoint of view, but I have no idea what you want to happenvertically. For instance, is that green bar aligned to the bottom of the page? The bottom of the viewport?