Welcome to WebmasterWorld Guest from 54.161.64.174

Forum Moderators: not2easy

Message Too Old, No Replies

Resizing submit buttons - max-width does not work.

     
1:42 am on Apr 10, 2013 (gmt 0)



All of my images resize/shrink based on screen resolution, with the exception of image-based submit buttons.

Is there a special CSS command required to get those to shrink, as well?

<input type="image" class="submit" src="image.gif">


This does not work:
.submit{
max-width:100px;
}
5:09 am on Apr 10, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



A foreground image will always display at its natural size unless you've explicitly told it to use a different size. That's the image itself, not the <input> area. A background image...

Well, you know what comes next: What proportion of MSIE users are you prepared to dump? ;)
8:45 pm on Apr 12, 2013 (gmt 0)



It doesn't resize on Firefox or Chrome, either - so I think I must be missing something here, correct?
9:18 pm on Apr 12, 2013 (gmt 0)

WebmasterWorld Senior Member lucy24 is a WebmasterWorld Top Contributor of All Time Top Contributors Of The Month



Heh. What I meant was: There are lots of CSS things involving background-size that will do what you want. But many of them are not supported in MSIE < {current-version + 1}
9:42 pm on Apr 12, 2013 (gmt 0)



I've learned the hard way over the past few weeks about MSIE not playing nice. :)
I don't even bother updating my IE stylesheet until I get Firefox & Chrome to do what I want.
 

Featured Threads

Hot Threads This Week

Hot Threads This Month