Wrox Programmer Forums
|
Classic ASP Basics For beginner programmers starting with "classic" ASP 3, pre-".NET." NOT for ASP.NET 1.0, 1.1, or 2.0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Classic ASP Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 31st, 2003, 01:51 PM
Authorized User
 
Join Date: Dec 2003
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to bsausser
Default Width in pixels from width in percentage

Ultimate goal is to resize an image based on the width of the table.cell or a panel.
* The Image.Width Unit Percentage is based on the Screen Resolution so that doesn't work
* The table.cell.width at design time is set to 100%

I want to determine the actual pixel width (n) calculated from the 100% rendering of the cell or panel so that I can use that info in the Image.Width = Unit(n, UnitType.Pixel).

Things I Have Already Looked At: (but could not make work)
* Unit.Pixel Method
* Unit.Type Property
* UnitType.Pixel

I'm looking for ideas or new directions in research for a solution.

Any Comments are greatly appreciated.


Brian Sausser, MCP
(858) 229-6129
__________________
Brian Sausser, MCP
(858) 229-6129
 
Old December 31st, 2003, 02:31 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

You won't be able to determine the render width of the cell at the server. Images can also use percentages for size attributes. HTML allows an img tag to have width="100%". Try Unit.Percentage(100).

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
Width Irritation asearle HTML Code Clinic 2 October 30th, 2007 02:13 AM
Screen width day10 Classic ASP Basics 1 March 2nd, 2007 12:58 PM
Printing the whole width marclena Javascript 1 July 1st, 2005 06:59 AM
calculating <td> width in pixels Morrislgn Javascript 8 June 8th, 2004 04:29 PM
Column width immanuelsamuel Oracle 2 March 13th, 2004 10:30 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.