Jump to content

Html Help


CmpFreak88

Recommended Posts

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

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:

post-71214-1269040592_thumb.jpg

 

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

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

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

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...