how to handle different screen resolutions?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ravideep
    New Member
    • Jul 2009
    • 7

    how to handle different screen resolutions?

    if I set the website layout in pixels, say 800X600. It works fine with screens with window size 800X600. But if someone is having screen 1200X800, then it doesn't stretch to the full window. How can I make a proportionate layout for different screen resolutions. Moreover if I use width and height in percentage(%) say 100%, the images do not stretch accordingly.
  • Niheel
    Recognized Expert Moderator Top Contributor
    • Jul 2005
    • 2432

    #2
    You can use what is called a fluid width layout. This is basically setting your width to 100%. You can use CSS for this or if you are using tables just make sure your parent width is 100%.

    On the point about images, you can't really make images stretch without using some javascript if the windows stretch.

    You wont' be able to do this with PHP.
    niheel @ bytes

    Comment

    • ravideep
      New Member
      • Jul 2009
      • 7

      #3
      could u please elaborate more on fluid width layout.

      Comment

      • mfaisalwarraich
        New Member
        • Oct 2007
        • 194

        #4
        Fluid layout means it fits to the screen resolution and if you resize your browser window the content also resizes with the width. this may help u.
        Code:
        #img.source-image {
        	width: 100%;
        	position: absolute;
        	top: 0;
        	left: 0;
        }

        Comment

        Working...