Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 157
  • Last Modified:

image in html

Hi
i want to make an html file with image in it that will be opened to the full size of the broweser
how should i do that????
something like
<img src="..." ????>
0
ntdragon
Asked:
ntdragon
  • 3
  • 3
1 Solution
 
knightEknightCommented:
Do you mean you want the image to be the size of the screen?

<HTML>
<BODY>
<SCRIPT language='javascript'>
  var w=screen.width-10;
  var h=screen.height-15;
  top.moveTo(1,1);
  top.resizeTo(w,h);
  document.writeln("<IMG src='myimage.gif' width='"+w+"' height='"+h+"'>");
</script>
</body>
</html>
0
 
knightEknightCommented:
or even better is this:

<HTML>
<BODY>
<SCRIPT language='javascript'>
  var w=screen.width-5;
  var h=screen.height-5;
  top.moveTo(1,1);
  top.resizeTo(w,h);
</script>
<IMG src='myimage.gif' width='100%' height='100%'>
</body>
</html>
0
 
jbirkCommented:
Just tell it to take up 100% of width and height:
<img src="agif.gif" width="100%" height="100%" border=0>

If you are wanting to change more than just one image, it may be more complicated.  Post you current html, and I can try to come up with a plan for stretching it.
-josh
0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
jbirkCommented:
jbirk changed the proposed answer to a comment
0
 
jbirkCommented:
Kek beat me to it again!  :)
0
 
knightEknightCommented:
just barely!  :)
I don't know why I didn't think of that the first time.  I guess I was just focusing on getting the window size to match the screen size.
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

  • 3
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now