repeat image for border

J

Jon Slaughter

Can someone point me to some resources on how to tile an image to create a
border?

<td>
<img src="images/MTile.png" width="1" height="30" alt=""></td>

I have something like that where I need to repeat x times where x depends on
the width of the browser. (Not sure if its a good idea to use a bitmap of
width 1 but I could use one that is larger and then use both(e.g., maybe one
that is 10 pixels wide and repeat that as needed and let the 1 pixel wide
one get the rest(I have some "ends" on the border that I need to display too
so it sorta needs to be exact))

Not sure how to do this with js(just learning it) but obviously I just need
to get the width of the border and then figure out how many times I need to
repeat the code.

I have several issues I am wondering about though. First off is that I have
used photoshop imageready to create a roll over menu bar but in firefox when
I use the down state it leaves a selection rectangle around the image but in
IE it does not do this. It does not look nice in firefox and I'm sure there
is some way to prevent it. (for some reason it selects it when you click the
menu item and this probably can be turned off using css?)

Another issue, which isn't a big deal, is that I'm using symmetric bitmaps
to "cap" the border. I was wondering if it is possible to flip the image
using html or js so that I don't have to have a seperate image for it?

Thanks,
Jon
 
O

OmegaJunior

Jon Slaughter said the following on 3/11/2007 3:02 AM:

CSS is your friend.

Yes. Isn't it possible to set it using html only? Although you wouldn't be
able to set the direction of repetition. I know this works for the body
element. Maybe this works for a td element as well?

Something like <td background="myimage.png"> &nbsp; </td>

(The non-breaking space is added because some browsers ( *cough* Microfost
Internet Exploder *cough* ) refuse to show empty table cells even when
specifically instructed to show them. )
 
O

OmegaJunior

Like I said, I stopped using HTML 3.2 almost 10 years ago.

Never burn ships that sail! With all the browser incompatibilities knowing
good ol' html does come in handy.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,999
Messages
2,570,243
Members
46,838
Latest member
KandiceChi

Latest Threads

Top