homepage Welcome to WebmasterWorld Guest from 54.226.93.128
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Subscribe to WebmasterWorld

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Resizing submit buttons - max-width does not work.
brokaddr




msg:4563311
 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;
}

 

lucy24




msg:4563347
 5:09 am on Apr 10, 2013 (gmt 0)

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? ;)

brokaddr




msg:4564360
 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?

lucy24




msg:4564370
 9:18 pm on Apr 12, 2013 (gmt 0)

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}

brokaddr




msg:4564375
 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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved