Ok I'll try to be as clear as possible with what I want, but for all I know the solution might be so damn simple... anw...

I have a picture, alright.. usual way of putting it:

<img src='bla bla' height='100%' width='100%'>

And I actually wanted it to be something like a background coz I wanted to have some textbox on in!

But if I do:

<table background='bla bla'>

the problem with this is that the image is treated like... well, a background and not an image... If I were to open the web with a higher resolution comp, the picture will just duplicate itself and it suck. Whereas when I left it as an <img> with 100% width and height the picture will auto resize itself, which is what I want.

Ok so one "solution" I got was to dissect my pics into multiple pics and arrange it in a way that it'll look as if my textboxes are on top of my picture... but it's so tedious! Is there no other way?

Is there a way to "lock" the table's background image to the size of the table itself?

8 Years
Discussion Span
Last Post by diafol

Can't you do a z-index in css?

table tr td img{
  z-index: -1;

If not using css, place in style tags in head area of page:

table tr td img{
  z-index: -1;

Edited by diafol: n/a


Thanks Ardav! I managed to do it... =)
For reference's sake:

<style type="text/css">
<div class="main">
<img name="out" src="whatever.jpg"  width="100%" height="100%">

Edited by AdventDeo: n/a


what does it mean its not treated like an image

I think he was referring to the bg img not resizing when treated as a 'background-image' attribute in css. If it's tagged (<img>) you can set auto-resize on window resize (100%).

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.