This is pointless. You're not ever going to get a browser canvas to be the same width as the browser window. (Unless you toggle the browser into full-screen mode)
Unless you know exactly how many pixels the managed window decorations are, i.e. the window border, the title bar, the width of the scrollbar, the number of toolbars the user has enabled, the height of the tab strip, etc. it's just an exercise in uselessness to get all careful with sizing background images "perfectly". If it really is the end of the world that the graphic not be cut in half, you may want to check into some CSS magic - I don't know if there is a way to specify that you don't want a graphic to repeat within a specific container, and then you can programmatically fill the canvas with those containers using some Javascript. Of course, I've never tried this, so I don't know if you could do that. My recommendation is to scale your background image to a 1x1 pixel image, then it will never be cut in half. On 11/20/2009, "Mark Teixeira" <[email protected]> wrote: >32 x 24 should work too. Since all those resolutions are a 4x3 ratio, just >take the GCF of all the horizontal resolutions and the GCF of the vertical >resolutions. Different borders could change that though. > >On Thu, Nov 19, 2009 at 5:53 PM, Peter Manis <[email protected]> wrote: > >> 8x8 pixels >> >> On Thu, Nov 19, 2009 at 5:16 PM, Paul Saenz >> <[email protected]>wrote: >> >>> This is a math problem. >>> I want to make a browser background tile. >>> I want to find out what size I need to make >>> the tile so that it will fit exactly into 4 different >>> screen resolution sizes. The sizes are 640X480 >>> 800x600, 1024x768 and 1280x960 >>> >>> what size tile will fit perfectly in each of those >>> resolution so that they will all be whole tiles, and >>> there will be no tiles that are cut in half or whatever? >>> >>> If you could also supply the equation, that would be >>> helpful, because then if I have to make adjustments for >>> boarders or plug in different resolutions, then I can. >>> >>> Thanks >>> Paul >>> >>> >>> >>> _______________________________________________ >>> LinuxUsers mailing list >>> [email protected] >>> http://socallinux.org/cgi-bin/mailman/listinfo/linuxusers >>> >>> >> >> _______________________________________________ >> LinuxUsers mailing list >> [email protected] >> http://socallinux.org/cgi-bin/mailman/listinfo/linuxusers >> >> _______________________________________________ LinuxUsers mailing list [email protected] http://socallinux.org/cgi-bin/mailman/listinfo/linuxusers
