Skip to main content
May 9, 2008
Question

Make Page expand depending Screen size

  • May 9, 2008
  • 4 replies
  • 535 views
I want to design a page that expands/contracts depending with the screen resolution or size. Any info will be appreciated.
Jack
    This topic has been closed for replies.

    4 replies

    tclaremont
    Inspiring
    May 9, 2008
    Theoretically, you could use JavaScript to attempt to determine the viewer's screen resolution. This will work for some people, but is considered pretty much obsolete practice nowadays. Dictating the width of your pages as a percentage will work for the most part, but is only a half step better than the JavaScript approach.

    The best solution, as suggested, is to learn effective CSS coding practices.
    Inspiring
    May 9, 2008
    while correct, that does not quiet cover expanding the content
    vertically, does it? most 'vertical things' in css are rather tricky,
    that's why i recommend getting a good book. you can, of course, get all
    the info from various blogs and websites, but you still may want to have
    that book as an offline reference...

    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/
    May 9, 2008
    For vertical, you can add the height attribute using a percentage in addition to the width. You just have to make sure that you dont have any constraints around it limiting its size.
    May 9, 2008
    You will need to define your width as a percentage, for example <table width="70%"> or define it within your style sheet, which is most likely the preferred way.
    Inspiring
    May 9, 2008
    start by googling 'fluid css layout'.
    then get a good book on CSS and study it.


    Azadi Saryev
    Sabai-dee.com
    http://www.sabai-dee.com/