By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,636 Members | 1,941 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,636 IT Pros & Developers. It's quick & easy.

Is Table Width Required for Table that Holds Image?

P: n/a
I am dynamically generating pages from images on the server and place each
image into a single cell table (which I use to create a border around the
image)
The problem is that if I do not specify a table width, sometimes the table
will collapse over image, cutting off the right side of the image. This
means that for each image I need to instance an "Image" class and read its
width property, which is a huge preformance killer. Has anyone else
encountered this issue that has found a solution that does not require
setting the table width...

Thanks

Earl
Nov 18 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Jon
Hi,
you don't really need a table just to add a border, you can do
<style type="text/css">
img{
border: 2px solid black;
}
</style>
will give all your images a 2 pixel black border

Jon

"Earl Teigrob" <ea******@hotmail.com> wrote in message
news:OP****************@TK2MSFTNGP12.phx.gbl...
I am dynamically generating pages from images on the server and place each
image into a single cell table (which I use to create a border around the
image)
The problem is that if I do not specify a table width, sometimes the table
will collapse over image, cutting off the right side of the image. This
means that for each image I need to instance an "Image" class and read its
width property, which is a huge preformance killer. Has anyone else
encountered this issue that has found a solution that does not require
setting the table width...

Thanks

Earl

Nov 18 '05 #2

P: n/a
> Earl Teigrobwrote:
I am dynamically generating pages from images on the server and place
each
image into a single cell table (which I use to create a border around the image)
The problem is that if I do not specify a table width, sometimes the table will collapse over image, cutting off the right side of the image. This means that for each image I need to instance an "Image" class and read its width property, which is a huge preformance killer. Has anyone else
encountered this issue that has found a solution that does not require setting the table width...

Thanks

Earl


Your are using server controls for the image?

if so, you can set the border properties of the image on the server
control directly. you don't need to use a table to set the border.
Posted Via Usenet.com Premium Usenet Newsgroup Services
----------------------------------------------------------
** SPEED ** RETENTION ** COMPLETION ** ANONYMITY **
----------------------------------------------------------
http://www.usenet.com
Nov 18 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.