CmpFreak88 Posted January 29, 2005 Posted January 29, 2005 Alright, I'm working on a website layout. I made it with Photoshop and ImageReady, so I have a header, footer, and a center content area. Now when I add content to the middle I want it to automatically expand. I've set my table sizes so that when I add content it automatically expands it, but now I need to know how to get a repeating background image. I was thinking about using a CSS tag but I couldn't figure out how to do it. Thanks. Share this post Link to post Share on other sites More sharing options...
henbenley Posted January 29, 2005 Posted January 29, 2005 I just did this the other week and it was pretty easy. Heres what I did and it worked great: You have to slice your template with a middle section and then the left and right outsides. Like this: Then you need to save your template and then do some HTML coding, I use notepad, but as long as you can edit the HTML then it'll work: Heres the code that you need to use: <TR><TD COLSPAN=10><IMG SRC="images/content_top.jpg" WIDTH=640 HEIGHT=57 ALT=""></TD></TR> <TR><TD COLSPAN=2 background="images/content_left.jpg"></TD> <TD COLSPAN=6 background="images/content_center.jpg"> PUT YOUR TEXT HERE AND IT WILL EXPAND LIKE MAGIC. </TD><TD COLSPAN=2 background="images/content_right.jpg"></TD></TR> <TR><TD COLSPAN=10><IMG SRC="images/content_bottom.jpg" WIDTH=640 HEIGHT=85 ALT=""></TD></TR> Just replace the width's, height's, and image names with whatever you want. If it doesnt work right and you need help I'll be back online around 10pm est. Share this post Link to post Share on other sites More sharing options...
CmpFreak88 Posted January 30, 2005 Posted January 30, 2005 But the problem is, when you do that you lose the sides. I would need the sides to expand along with the contenct area. Would it do this? I was thinking about making it all one center slice and using some code to have it repeat the image down. Edit: Wow... I had it right all along except I was putting the background image in the TR tag instead of the TD tag... AHH! Thanks! Share this post Link to post Share on other sites More sharing options...
henbenley Posted January 30, 2005 Posted January 30, 2005 The code repeats slice 11, 12, and 13 in that picture. It leaves the top and bottom at the end of the repeats. Its really a great thing to be able to do. otherwise you'd have to make a huge content box for more info, but then a page with less info would have teh huge box too. Share this post Link to post Share on other sites More sharing options...
CmpFreak88 Posted January 31, 2005 Posted January 31, 2005 Well see for this one, I need it to automatically expand since I'm using it for a Blogger template so it will always be changing in size. Thanks for the help. Share this post Link to post Share on other sites More sharing options...
Recommended Posts
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now