SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    RTFM ashleyk's Avatar
    Join Date
    Dec 2005
    Location
    Rochester, New York
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    What happens when you don't specify wifth and height for an img tag?

    i have a simple image gallery where small thumbnail images change a larger image. the problem is the large images aren't all the same size. I'm using the built in dreamweaver swapimage functions, and i've found that if the width and height of the large image IS specified the swapped images get distorted by getting squeezed into the original image's dimensions.

    A workaround i found is to not specify a width and height of the original image. The page still validates with out the width height attributes, but i was wondering if there are other reasons why i shouldn't do this?

    thanks,
    ---------------------------------------
    Ashley Kennedy
    ---------------------------------------
    how does a designer get roped into writing code?

  2. #2
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

  3. #3
    RTFM ashleyk's Avatar
    Join Date
    Dec 2005
    Location
    Rochester, New York
    Posts
    435
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    any way around

    any simple solutions to swapping images of different sizes?
    ---------------------------------------
    Ashley Kennedy
    ---------------------------------------
    how does a designer get roped into writing code?

  4. #4
    SitePoint Wizard silver trophybronze trophy Nadia P's Avatar
    Join Date
    Oct 2004
    Location
    NSW Australia
    Posts
    3,564
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    As long as you are aware of the problems associated with not specifying the image dimensions (as described in the link provided by Ben), then don't. As long as you are happy that the page works cross browser, then I wouldn't be *too* worried about it.

    You may want to look at a couple of DW extensions:

    Drews' Open Picture Window Fever - free extension:
    www.dreamweaverfever.com/grow/

    another couple of extensions - commercial though but worth the money (I use Koasweaver extension myself but move the script into a separate js file and link to it - so that the page validates

    http://kaosweaver.com/extensions/det...hp?id=62&cid=7

    http://www.valleywebdesigns.com/vwd_jspw3.asp

    Nadia


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •