Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Resizable page

Status
Not open for further replies.

tusc

Technical User
Jan 24, 2002
2
0
0
SI
Hi, all!
I'm a begginer DW. I prepared one page with layers and I use one .jpg image for background. I also prepared menuwith hide/visible layers and that layers containig image (.jpg)Ok.Everithing is prepared for best view in 800x600 but when I try to see this in resolution 1K and more are those images so small. I would like to make this layers/images bigger. How?

Thank you and BR,
Tusc
 
Well if you make the layers/images bigger to accomadate for higher resolution, then in lower resolution the images will be very large...
One alternate solution is dynamically resize the images depending on the resolution...
So the skemantics would be something like this:
var image1
var highres = false
var lowres = false
var wide = screen.width
var length = screen.height

if ((wide >= 1024) || (length >= 768)) {
highres = true
}
else {
lowres = true
}

if(highres) {
document.write('<img src=&quot;image1.jpg&quot; width=&quot;124&quot; height=&quot;30&quot; border=&quot;0&quot; alt=&quot;image1&quot;>');
}
else {
document.write('<img src=&quot;image1.jpg&quot; width=&quot;98&quot; height=&quot;22&quot; border=&quot;0&quot; alt=&quot;image1&quot;>');
}

What this means is that if the user has a high resolution then the green portion will be true, if not then the red portion will be true... I have not failed; I merely found 100,000 different ways of not succeding...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top