• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • 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
Ultimate Tool Kit for Technology Solution Provider

Broken down into practical pointers and step-by-step instructions, the IT Service Excellence Tool Kit delivers expert advice for technology solution providers. Get your free copy now.

 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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