Results 1 to 2 of 2

Thread: diferrent css for different resolutions

  1. #1
    Join Date
    Oct 2008
    Posts
    50
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default diferrent css for different resolutions

    I want to create a different css for 800*600 resolution and another css for the biggest resolutions.I need to create just 2 css files because the other resolutions look nearly the same size.

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    This is not possible in CSS. You can use Javascript to detect the resolution of the window and change based on that, BUT this then requires that Javascript is enabled. Also, many people do not have full-screen windows: they may have two windows on the screen. What would you do in those cases? What about mobile devices? In theory you could try this, but it is almost always a bad idea.
    It is much better to just use percentage-based layouts so that it adjusts properly to any size.

    If you do want to do this, you can just search "javascript detect resolution" and use that (with if statements) to change the stylesheet.
    Daniel - Freelance Web Design | <?php?> | <html>| español | Deutsch | italiano | português | català | un peu de français | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

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
  •