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

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Fit image into an html with PHP

Reply to Message Icon

Name: rsasalm
Date: October 17, 2005 at 06:15:17 Pacific
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



Sponsored Link
Ads by Google

Response Number 1
Name: Michael J (by mjdamato)
Date: October 17, 2005 at 08:36:16 Pacific
Reply:

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


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Web Development Forum Home


Sponsored links

Ads by Google


Results for: Fit image into an html with PHP

converting an HTML pg to php w/Db www.computing.net/answers/webdevel/converting-an-html-pg-to-php-wdb/2316.html

Need help with PHP script (form) www.computing.net/answers/webdevel/need-help-with-php-script-form/2636.html

stretch image to fill cell? www.computing.net/answers/webdevel/stretch-image-to-fill-cell/3179.html