Computing.Net > Forums > Web Development > Fit image into an html with PHP

Fit image into an html with PHP

Reply to Message Icon

Original Message
Name: rsasalm
Date: October 17, 2005 at 06:15:17 Pacific
Subject: Fit image into an html with PHP
OS: WinXP
CPU/Ram: P4
Comment:

Hi all,
I am using PHP 5 to develop my web pages.
I am using few images at the top of the page.
When I expande the browser the images don't. What to do so that the images also expand or decrease as I expand or decrease the browser size?
thanks for help
regards
/rsasalm


Report Offensive Message For Removal

Response Number 1
Name: Michael J (by mjdamato)
Date: October 17, 2005 at 08:36:16 Pacific
Subject: Fit image into an html with PHP
Reply: (edit)

There's really no good way to do that. You could create a table with 100% width and make cells with relative widths. Then put the images into each cell with 100% widths. That works for the width of the images, but what about the height? As the user resizes the window, there is no built in method to have the width and height scale proportionately - so your images would get skewed. You might be able to do it with some involved JavaScript, but then you run into compatibility issues.

Michael J


Report Offensive Follow Up For Removal







Use following form to reply to current message:

   Name: From My Computing.Net Settings
 E-Mail: From My Computing.Net Settings

Subject: Fit image into an html with PHP

Comments:

 


  Homepage URL (*): 
Homepage Title (*): 
         Image URL: 
 
Data Recovery Software