Results 1 to 3 of 3

Thread: Convert JS to CSS

  1. #1
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default Convert JS to CSS

    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!
    Last edited by lord22; 11-15-2009 at 01:49 AM.

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    lord22 (11-14-2009)

  4. #3
    Join Date
    Jul 2008
    Posts
    81
    Thanks
    38
    Thanked 2 Times in 2 Posts

    Default

    Thanks
    Last edited by lord22; 11-15-2009 at 01:49 AM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •