Welcome to Bucaro TecHelp!

Bucaro TecHelp
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Victims of Sandy Hook

Stop the Slaughter of Innocents. Congress is bought and paid for by gun lunatics and gun promotion groups. If you want to live in a safe America, help buy Congress back for America. Send a donation to Mayors Against Illegal Guns, 909 Third Avenue, 15th Floor New York, NY 10022

The Screen Object

Maybe your layout is such that the user must have a certain screen size, a minimum screen size, or a certain color depth for your webpage to look right. The Screen object gives you that information about the user's sreen.

Object PropertyReturns
screen.widthThe screen width in pixels
screen.heightThe screen height in pixels
screen.availWidthAvailable screen width after subtracting for task bar
screen.availHeightAvailable screen height after subtracting for task bar
screen.colorDepthNumber of bits used to store a color pixel
screen.fontSmoothingEnabledFont Smoothing as set in Windows Control Panel

Click Here to get screen information.

<script type="text/javascript">
function screenInfo()
  var outStr = "Screen Width= " + screen.width + "<br />";
  outStr += "Screen Height= " + screen.height + "<br />";
  outStr += "Available Screen Width= " + screen.availWidth + "<br />";
  outStr += "Available Screen Height= " + screen.availHeight + "<br />";
  outStr += "Color Depth= " + screen.colorDepth + "<br />";
  outStr += "Font Smoothing Enabled= " + screen.fontSmoothingEnabled + "<br />"

  document.getElementById("scrninfo").innerHTML = outStr;

Note: The screen object is a property of the window object, but you don't need to specify the window object when calling the screen object because the window object is the default object.

window.resizeTo(screen.availWidth, screen.availHeight);

An example use of the Screen object might be to use the window object's resizeTo method to make the users browser window go full-screen when it displays your webpage.

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro

Web Design Sections

Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2016 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268