Resolution problem

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sasimca007
    New Member
    • Sep 2007
    • 129

    Resolution problem

    Hai friends,
    I have a big problem, that is i have a image with 1024x640 resolution, but when it came to small or big resolution systems, the image is not setting fit some space is coming rightside and bottom. How to fit a small resolution image to any resolution systems?

    One another doubt is if i have highest resolution image, how to fit that to small resolution systems without scrolling.

    Please help me friends, it is urgent......... ......
  • hsriat
    Recognized Expert Top Contributor
    • Jan 2008
    • 1653

    #2
    I think you are trying to set the image as a background and you want it to stretch according to the screen size.
    Add this to your code:
    Code:
    <div 
        style="
            position:absolute;
            z-index:-1;
            height: 100%;
            width:100%;
            top: 0px;
            left: 0px;
            bottom: 0px;
            right: 0px;"
    ><img
        src="your_image.png"
        alt=""
        style="
            height: 100%;
            width: 100%;"
    /></div>

    Comment

    • sasimca007
      New Member
      • Sep 2007
      • 129

      #3
      Resolution problem

      Thanks my friend, but i want to set the image as body background then how to do it?

      Comment

      • hsriat
        Recognized Expert Top Contributor
        • Jan 2008
        • 1653

        #4
        This is the only way you can stretch the image in the background. z-index: -1 and position: absolute are configured in order to give it a background like appearance.

        Comment

        • sasimca007
          New Member
          • Sep 2007
          • 129

          #5
          Resolution problem

          Thanks my friend,
          It is working, many many thanks

          Comment

          Working...