Image is not placed properly

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • 1266
    New Member
    • Jul 2012
    • 2

    Image is not placed properly

    Image is not placed properly.

    I have a div with height and width as 302*302 then,

    I want to place the image,whatever the image size should be(eg:-1024*768,250*25 0)

    The image must be viewed as completely in that div.


    I had tried by giving style="overflow :auto;"but, both horizontal and vertical scrollbars are apperaed for the div.
    And also,the image is also showing very big when we given the big image and very small when we given the small image.

    I want when the big (or) small image is given,it should be displayed in that div only without scroll bar.


    Plz help me
    Attached Files
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    Set the size of the image element directly, not through the div.

    Comment

    • Exequiel
      Contributor
      • Jul 2012
      • 288

      #3
      try to put this one to your div... height: auto; width: auto; ...

      Comment

      • lyodmichael
        New Member
        • Jul 2012
        • 75

        #4
        you can use the code auto size, any size of the image will be one size.

        Comment

        Working...