> My dilemna was and still is to autofit an image of any size (entire image
should be viewable) within the table's background image property using the
style attribute. This "table" is currently no more than roughly 100 pixels
on either side. 

 

Hi Matt,

 

Here is a sample mockup I created using an overlay technique. Substitute the
table for the div in your case. A better approach may be to resize the image
on the server when the user uploads it using the GD2 library. I used the
image resizing and cropping facilities for my home grown CMS.

 

<html>

                        <head>

                                                <style>

 
img.stretch {

 
width: 500px;

 
height: 300px;

 
z-index: -1;

 
position: absolute;

 
top: 50;

 
left: 50;

                                                                        }

 

 
div.overlay {

 
width: 500px;

 
height: 300px;

 
z-index: 1;

 
position: absolute;

 
top: 50;

 
left: 50;

                                                                        }

                                                </style>

                        </head>

                        <body>

                                                <div class="overlay">Here is
some text</div>

                                                <img src="logo.jpg"
class="stretch" />

                        </body>

</html>

 

 

Best of luck,

Kepler Gelotte



*******************************************************************
List Guidelines: http://webstandardsgroup.org/mail/guidelines.cfm
Unsubscribe: http://webstandardsgroup.org/join/unsubscribe.cfm
Help: [EMAIL PROTECTED]
*******************************************************************

Reply via email to