0

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:

<table><tr><td>
<img src='bla bla' height='100%' width='100%'>
</td></tr></table>

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'>
....</table>

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?

3
Contributors
5
Replies
6
Views
7 Years
Discussion Span
Last Post by diafol
0

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:

<style>
table tr td img{
  z-index: -1;
}
</style>

Edited by diafol: n/a

0

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

<style type="text/css">
div.main
{
position:absolute;
left:7px;
right:7px;
top:75px;
z-index:-1;
}
</style>
<div class="main">
<img name="out" src="whatever.jpg"  width="100%" height="100%">
</div>

Edited by AdventDeo: n/a

0

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.