# Changing template size depending on content

**URL:** <https://forum.kirupa.com/t/changing-template-size-depending-on-content/28574>\
**Category:** Uncategorized\
**Created:** [August 15, 2003, 6:21am UTC](https://forum.kirupa.com/t/changing-template-size-depending-on-content/28574 "2003-08-15T06:21:51Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![blah\_de\_blah](https://avatars.discourse-cdn.com/v4/letter/b/a8b319/32.png) [@blah\_de\_blah](https://forum.kirupa.com/u/blah_de_blah)\
**Post date:** [August 15, 2003, 6:21am UTC](https://forum.kirupa.com/t/changing-template-size-depending-on-content/28574/1 "2003-08-15T06:21:51Z")

</div>

I was wondering how sites like these:  
[http://www.absolutecross.com](http://www.absolutecross.com)

Stretch their templates according to their content amount? It seems like there is an image which repeats so it makes the template look longer when there is more content.

If you don’t know what i mean, go to different areas of the site, and then look at your scrollbar size. It changes, but the template looks the same, but there is more content :-\

ANyone know howta do this?? thanks!!

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 15, 2003, 10:52pm UTC](https://forum.kirupa.com/t/changing-template-size-depending-on-content/28574/2 "2003-08-15T22:52:35Z")

</div>

The “trick” is done using tiled background images within table cells for the sides, top and bottom edges so that they’ll expand and contract as needed.

Here’s the pertinent part of the source code, cleaned up a bit to be easier to read.

```php

<table WIDTH="310" BORDER="0" CELLPADDING="0" CELLSPACING="0" BGCOLOR="#F2F2F2">
  <tr>
    <td><img SRC="topleft.jpg" WIDTH="19" HEIGHT="29"></td>
    <td BACKGROUND="toptile.jpg"><img SRC="topmid_left.jpg" WIDTH="22" HEIGHT="29"></td>
    <td BACKGROUND="toptile.jpg" ALIGN="right"><img SRC="topmid_rt.jpg" WIDTH="109" HEIGHT="29"></td>
    <td><img SRC="toprt.jpg" WIDTH="26" HEIGHT="29"></td>
  </tr>
  <tr>
    <td BACKGROUND="sideleft.jpg" WIDTH="19">&nbsp;</td>
    <td COLSPAN="2" WIDTH="100%" VALIGN="top" BGCOLOR="#F2F2F2" CLASS="smaller-content">
      {text content here}
    </td>
    <td BACKGROUND="sidert.jpg" WIDTH="26">&nbsp;</td>
  </tr>
  <tr>
    <td><img SRC="botleft.jpg" WIDTH="19" HEIGHT="37"></td>
    <td BACKGROUND="bottile.jpg"><img SRC="botmid_left.jpg" WIDTH="22" HEIGHT="37"></td>
    <td BACKGROUND="bottile.jpg" ALIGN="right"><img SRC="botmid_rt.jpg" WIDTH="109" HEIGHT="37"></td>
    <td><img SRC="botrt.jpg" WIDTH="26" HEIGHT="37"></td>
  </tr>
</table>

```

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 16, 2003, 3:37am UTC](https://forum.kirupa.com/t/changing-template-size-depending-on-content/28574/3 "2003-08-16T03:37:41Z")

</div>

thanks abzoid, but just to make sure i get this right i have a couple of quesiton 🙂

Since i made my template in fireworks, i havta insert slices right. So where do i get the bottom tile and the top tiles? Do i just cut out the parts i want tiled, and save them seperately? thanks

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 16, 2003, 4:00am UTC](https://forum.kirupa.com/t/changing-template-size-depending-on-content/28574/4 "2003-08-16T04:00:53Z")

</div>

Right, you cut a portion of the graphic from those top and bottom edge slices so that each will tile as desired when used as a background image within the appropriate table cells.

---

<div class="post-metadata">

**Author:** ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)\
**Post date:** [August 26, 2003, 1:19am UTC](https://forum.kirupa.com/t/changing-template-size-depending-on-content/28574/5 "2003-08-26T01:19:34Z")

</div>

My advice would be to learn dreamweaver. It makes much cleaner sites. Fireworks can make life easy but the code it generates it pretty messy.

Just use Fireworks to output your images and build the site in Dreamweaver.

But if Fireworks does it for you, stick with it i guess. Just means you’ll be pretty limited in what you can do.

🙂
