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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HTML Images vs screen resolution

Status
Not open for further replies.

WestCoastKid

Vendor
Jun 3, 2002
94
US
Hey Gang,
I'm new to HTML and have a quick question. My company has put me in charge of the website and I'm having trouble getting an image to fill the entire screen.
I used photoshop to create content (a JPEG) and then loaded the content into our ISPs server.
The thing is depending on the endusers browser (IE vs Firefox on linux) the picure is sometimes very large (IE) & scroll bars will appear on the browser window to compensate, on other occasions the image is smaller (Firefox) and there is actually white space along the right side of the image.
Is there some kind of HTML code or something I can attach to the JPEG file to accomodate the endusers browser, to make the jpeg fill the entire screen leaving no white space on the side? Any suggestions?

 
Since users have different browsers, different screen resolutions and ultimately different sized browsers (not all users have it maximized) you cannot put an image on a page and claim it will fill entire screen. Your best bet would be to use it as a background -- in this case there would be no scrollbars, image would just be clipped on the bottom and right edge if user has a screen not big enough for your appetites.
Code:
<style="text/css">
body {
  margin: 0; /* ensure no white gutter exists */
  padding: 0; /* some browsers create white gutter with padding */
  background: black url(MyBigAssPicture.jpg) top left no-repeat;
}
</style>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top