PDA

View Full Version : CSS Problem (.org)


ast3r3x
2004-05-19, 21:06
Problem (http://24.152.215.123:2222/intouch/)

Ok, now I posted this on the old appleinsider. BUT I had to rig it and it still chose not to work completely correct. So let me reword, and hope that there will be new ideas and new helpful people.

It should look somewhat like the login box to the right of the screen (that's just an image and it will be replaced, but it's there for reference.

I rigged it up before by using 4 tables (one for positioning and repeat along the top, another for left, another for right, and another for the bottom to be repeated.) This didn't work completely.

Is there a way to repeat an image with CSS without it being the background?

hyperb0le
2004-05-19, 21:29
I believe this would work:


<style type="text/css">
body
{
background-image:
url("images/background.png");
background-repeat: repeat
}

.titlebar
{
background-image:
url("images/title_background.png");
background-repeat: repeat;
position: absolute;
top: 0px;
left: 0px;
}

table.display
{
position: absolute;
top: 225px;
left: 20px;
}

td.top-middle
{
background: url(images/display_top.png) repeat top;
}

td.bottom-middle
{
background: url(images/display_bottom.png) repeat bottom;
}

td.left
{
background: url(images/display_left.png) repeat left;
}

td.right
{
background: url(images/display_right.png) repeat right;
}

.login
{
position:absolute;
right: 45px;
top: 110px;
}
</style>

Then, in your body, use:


<table border="0" cellspacing="0" cellpadding="0" class="display" background="images/display_background.png">
<tr>
<td><img src="images/display_top_left.png"></td>
<td class="top-middle></td>
<td><img src="images/display_top_right.png"></td>
</tr>
<tr>
<td class="left"></td>
<td>
What I want is for the background of the <br />
table along the edges (top, left, right, bottom) <br />
to be covered with a repeating image.
</td>
<td class="right"></td>
</tr>
<tr>
<td><img src="images/display_bottom_left.png"></td>
<td class="bottom-middle"></td>
<td><img src="images/display_bottom_right.png"></td>
</tr>
</table>

It's really late, so I may have made some stupid errors, but you get the general idea.

ast3r3x
2004-05-19, 22:09
Thanks I'll try that out...now the real test though is to see if Win IE likes it ;)

ast3r3x
2004-05-19, 22:20
Ok I changed my code and it looks good in safari and Mac IE...the test will be at school tomorrow. If it works, I'll kiss ya. Ok I won't, but I'll send ya this (http://fleshlight.com/main/products.cfm?id=1001&CFID=375741&CFTOKEN=42655348)!

(courtesy of an appleoutsider thread:D)

Stroszek
2004-05-19, 22:51
If that doesn't work, let me know, I've done it before, I'll just have to dig it out.