Click to See Complete Forum and Search --> : Problem with browser margins.


wombatseks
01-13-2005, 06:36 PM
Hello.

I used to casually code way back in the 1995 days. Im back on the scene and trying to relearn what I forgot. Ive designed a website for my father in photoshop and exported an html file via Imageready. Im not afraid of code, but for the website I was making this was the best way to do it. I designed the website around an image table that is 700x475 pixels. What kind of code do I need to put down to ensure that the browser window will open to these dimensions as well?

Im stumped, and thinking the answer is probably easy.

THANKS!
wombatseks

p.s. www.williamboling.com is the site

PeOfEo
01-13-2005, 07:09 PM
You can't. The only way to make the browser open at those dimentions would require javascript, which is not enabled on all pcs. Your best bet is just to make it work for all resolutions. You can just have the thing aligned in the center of the page or something or you can make the page fluid. I do not think using photoshop to design your websites is a good idea. You are better off planning them (maybe with photoshop or just pen and paper), then writing the code, then going back and making images for it. But if you just try to slice up a picture in photoshop you are going to get something that eats at your bandwidth and performs poorly for non graphical browsers. Also tables are not the proper way to layout a website, nowadays css is the proper way to do it. So that is what you are going to need to catch up on, because css was definately not big in 95... the first draft came out in 94.

BonRouge
01-13-2005, 07:24 PM
You can use this :

self.resizeTo(700,475) to resize the window onload, but the problem you have then is that these numbers include the toolbars and sidebar (if the user uses one) so it won't be right.
If you open the page through a javascript link, you can tell the browser not to show the toolbars but people don't like that. This means that you couldn't do this with your index page.

I hope this helps a little.

btw... I'm often wrong, so don't take this as gospel.


Edit : D'oh! Beat me to it!

PeOfEo
01-13-2005, 07:28 PM
Originally posted by BonRouge
Edit : D'oh! Beat me to it! ;)