Image Size based on User Resolution

a1jit

Regular
Joined
Aug 19, 2005
Messages
89
Hi Guys,

I know how to get the resolution of user and i want to know how to put the height and width to represent this resolution using javascript..

The code that i use to get width of user resolution window is
Code:
screen.width, and screen.height

So when i place image, i tried doing the following but didnt work
I replace the width to be equal to = screen.width

Code:
		<asp:image id="Image1" style="Z-INDEX: 70; LEFT: 0px; POSITION: absolute; TOP: 0px" runat="server"
			Width=screen.width Height="85px" ImageUrl=".jpg"></asp:image><br>

Another question is how do i place or get the position just above the status bar in IE cause i want to place an image right at the bottom too..

Thanks very much for advice
 
When you say it didn't work what do you mean, the image didn't appear at all, it didn't appear in the place you wanted it to, or it wasn't the size you wanted it?
 
Hi Thanks for the reply...
Actually i got an error when i use screen.width

Parser Error Message: 'screen.width' can not be parsed as a unit as there are no numeric values in it. Examples of valid unit strings are '1px' and '.5in'.

So how do i convert the screen.width to the format that the image property accepts?
 
Back
Top