img help in html

Discussion in 'HTML & Website Design' started by vOlLvEriNe, Sep 29, 2013.

  1. #1
    hi all, I have a question, please help me, I have a img, like this,
    <img src="dp.jpg" />
    It will show like this
    proxy.jpg
    Now I Set this as
    <img src="dp.jpg" style="width:160px;height:160px;" />
    It will show as
    2.png
    But I Want To Show Like This,
    3.JPG
    Please Help In This case ..
     
    vOlLvEriNe, Sep 29, 2013 IP
  2. Original Hosting

    Original Hosting Active Member

    Messages:
    203
    Likes Received:
    12
    Best Answers:
    0
    Trophy Points:
    50
    #2
    Use <img src="dp.jpg" width="160" height="160" />

    Jordan
     
    Original Hosting, Sep 29, 2013 IP
  3. vOlLvEriNe

    vOlLvEriNe Member

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #3
    Nothing Changed, Same Result ..
     
    vOlLvEriNe, Sep 29, 2013 IP
  4. competent123

    competent123 Notable Member

    Messages:
    1,752
    Likes Received:
    71
    Best Answers:
    6
    Trophy Points:
    255
    #4
    competent123, Sep 29, 2013 IP
  5. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #5
    Just one thing -- if you want to show it cropped or resized, you should do so in the file, not on the page. Otherwise you are wasting bandwidth for pixels you aren't even showing!
     
    deathshadow, Sep 30, 2013 IP
  6. vOlLvEriNe

    vOlLvEriNe Member

    Messages:
    99
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    41
    #6
    Done Already ..
     
    vOlLvEriNe, Oct 4, 2013 IP
  7. domainmarket.io

    domainmarket.io Well-Known Member

    Messages:
    74
    Likes Received:
    6
    Best Answers:
    1
    Trophy Points:
    100
    #7
    You could always download a free program to crop the image. I've used GIMP for a few years now and it's very similar to Photoshop, but it's free vs. a couple hundred dollars.
     
    domainmarket.io, Oct 4, 2013 IP
  8. pkvadmin

    pkvadmin Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #8
    try this

    <div style="width:160px;height:160px;overflow:hidden;">
    <img src="dp.jpg" />
    </div>
     
    pkvadmin, Oct 4, 2013 IP
  9. pkvadmin

    pkvadmin Member

    Messages:
    7
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    31
    #9
    try this:

    <div style="height: 160px; overflow: hidden; position: relative; width: 160px;">
    <img src="dp.jpg" style="position: absolute; top: -20px;" />
    </div>
    HTML:
     
    pkvadmin, Oct 4, 2013 IP
  10. EmmyM

    EmmyM Peon

    Messages:
    16
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    1
    #10
    you should probably adjust the image in a program (such as Photoshop) first to make sure you are getting the correct aspect ratios so that you image doesn't become skewed.
     
    EmmyM, Oct 7, 2013 IP