View Full Version : Dynamically Resizing a Web Image

06-22-2009, 02:12 PM
To All,

Hi Guys, I'm fairly new to HTML/Web Development and have a simple question that I'm certain you guys should be able to help me with!

I'm putting together a SharePoint website for a company I'm interning with. In addition to this I've also been building a variety of charts in excel. These charts are published and than uploaded to the SharePoint website. The format of the charts is fairly straight forward, it's built in the MIME HTML Internet Standard. If your curious to see the exact code in these files just open excel and got to File->Save As Web Page...

My Question is this: Many of the users that log on to this site will have a PC with low resolution. How can I edit this file so that the image is dynamically resized based browser size/computer resolution? Or is it possible to do this? If not what code can I had to make the whole page smaller? I'm sure it's fairly straight forward and I realize that loads of resources on this exist, however since I don't know HTML that well I'd rather not spend a whole day learning it just do this this.

Let me know if you need any other sort of info to figure this problem out, thank you so much for your help!

Warm Regards,
Peter Wenzel

06-22-2009, 02:28 PM
you'll find something looking like:

<img src="directory/imagename.jpg" />

the easiest way of making it a dynamic width is to do this:

<img src="directory/imagename.jpg" width="80%" />

or making it a fixed width (average resolution is 1024x768 so I will do it for that resolution for you to fit nicely.

<img src="directory/imagename.jpg" width="950px" />

I think this is what you are after, and I will note that this doesn't ACTUALLY resize the image it only makes the original image squashed, if you wish to actually resize the image I would suggest you export it at a smaller size somehow, as the alternative is quite advanced if you are at an introductory level.

Hope it helps! :thumbsup:

06-22-2009, 03:04 PM
Thanks for the help so far!

Unfortunately it isn't that easy. It seems that the file is a collection of images. I found what seems to be a more significant height and width to edit however this unfortunately only resizes the chart at the center of the page.

Is there a way to treat the file as a single image and resize the whole thing? Thanks :)!

Also, you said trying to dynamically resize the page is extremely complex/difficult? This is a example of what I'm talking about http://www.amcharts.com/lib/amcolumn/auto-resizing-chart.html


P.S. Check out the attachment for a example of the file I'm talking about