Call javascript with table cell dimensions

A

AAaron123

I have an image inside a table cell.

I'd like to scale the image to fill the cell.

I have a javascript routine that can change the image's height but can't
seem to fine a place to call it with the cell dimensions not equal to zero.

Got any ideas where?


Thanks
 
A

AAaron123

It may be the width that should determine the size (or maybe the height).

But more importantly: As you may have guessed, I'm new at web development. I
wanted to try some javascript. I tried calling it in the onload event of the
image and other places but the cell sizes are always zero. (used debugger so
that I could check the values)

thanks



Eliyahu Goldin said:
Why don't you just specify the height in percentage?

If you care about different browsers, you may want to test it to see if
all of them handle image percentage height in the same way.

--
Eliyahu Goldin,
Software Developer
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin
http://usableasp.net


AAaron123 said:
I have an image inside a table cell.

I'd like to scale the image to fill the cell.

I have a javascript routine that can change the image's height but can't
seem to fine a place to call it with the cell dimensions not equal to
zero.

Got any ideas where?


Thanks
 

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

Forum statistics

Threads
473,734
Messages
2,569,441
Members
44,832
Latest member
GlennSmall

Latest Threads

Top