Making Image fit Page Size

a1jit

Regular
Joined
Aug 19, 2005
Messages
89
Hi Guys,

Im just not sure how to do this..Dont know its simple or tough..

I want to place an image (banner) at top of the login page, and the length should be equal to the page size..I cant seem to get it done..

So i place using the <asp:image> tag. and i specify a certain height and width..

I want the width to cover the whole page length actually, but not sure how..

Currently if i put with 1800px, and view the page using smaller resolution, i see scrollbar..

So, how do i make the image fit on the page exactly as the resolution user is using so that i dont need any scrollbar and can cover the full width of the page?

Thank You
 
You could use a table or a div tag and set the width dynamically using javascript and the availWidth function of the DOM. Then set the height to whatever you want. And using the background-image style attribute to set the image itself.
 
Back
Top