change image size by percentage

edited February 2008 in Stylish
I wrote a test style to try to figure out how to change the size of an image by percentage.

this is my test image image
http://static.thepiratebay.se/img/icons/dl.gif

@namespace url(http://www.w3.org/1999/xhtml); @-moz-document domain("thepiratebay.se") { img[src*="/dl.gif"] { height: 300% !important;} }

Putting it mildly - it didn't do what I expected - the image is gigantic - about 1500 pixels high.

What am I doing wrong?

Comments

  • Percentage values are not relevant to the default/original/true size of the resource (not even images). The percentage is a percentage of the object's container (parent) element.

    height: 300%

    Is 3 times the calculated height of the image's parent. Huge.
Sign In or Register to comment.