www.webdeveloper.com
Results 1 to 2 of 2

Thread: Changing Image size links

  1. #1
    Join Date
    Apr 2003
    Location
    Rosemount, MN
    Posts
    2,287

    Changing Image size links

    Is there a way to make images be the normal size using percent?

    I am making a image link, that I want to change size when the mouse hovers over it. I need something that willbe dynamic to all shaps and sizes of images. some may be 100px by 100px, and other may be 100px by 200px, and sizes large and smaller than that.

    I was thinking that a code like this might work:
    Code:
    a:link img{border:0px; width:100%; height:100%;}
    a:visited img{0px; size:100%}
    a:hover img{border:0px; width:110%; height:110%}
    a:active img{0px; size:100%}
    but it doesn't, all it does is make the image huge, then even bigger when the mouse moves over it.

  2. #2
    Join Date
    Jul 2005
    Location
    USA
    Posts
    3,910
    The dimensions will be relative to the parent element. CSS does not have a way to directly do what you want to do.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles