Log in

View Full Version : Convert JS to CSS



lord22
11-13-2009, 06:50 PM
Hi,

I've created a page which is vertically aligned to the center using CSS, with 610px width, and I used JS to fit the width of the page to the client browser width.

However, I don't want it to stretch on every load, how can I convert it into a css website?

Thanks!

jscheuer1
11-14-2009, 04:02 AM
Don't use absolute positioning like that. Vertical centering is meaningless if you have more than one window height worth of content, and in a case like that portions of your content will often not be able to be viewed. The window height of the users will vary greatly depending upon screen height/resolution, and more importantly upon the size of their browser window.

lord22
11-14-2009, 11:13 PM
Thanks