[thelist] IE adding padding to submit buttons

James O'Donnell jimmyropes at gmail.com
Tue Jul 28 18:46:19 CDT 2009

This will explain why you are seeing different results based on if the
browser follows the W3C box model or not.


You can get around this by putting the text in a span tag and the image in
am img tag.  Wrap both in an anchor tag and it should render correctly on
all browsers.

Try something like this.
<a href=""><span>Some text</span><img src="YourImageURI" /></a>

In the href put "javascript:YourSubmitScript();"


<div onclick="YourSubmitScript();"><span>Some text</span><img
src="YourImageURI" /></div>

If you want to go to different destinations depending on if the text or the
image is clicked then put separate onclick events in the span and img tags
pointing to the appropriate javascripts or pass a parameter to one
javascript with the logic to determine to where you want to link.

-----Original Message-----
From: thelist-bounces at lists.evolt.org
[mailto:thelist-bounces at lists.evolt.org] On Behalf Of Bill Moseley
Sent: Tuesday, 28 July, 2009 19:11
To: thelist at lists.evolt.org
Subject: [thelist] IE adding padding to submit buttons


If you look at that with Firefox/Opera/Safari there's no padding inside
those red boxes (borders on the <input>).

If you look at this in IE6/7 (didn't test IE8)  then there's "padding", but
it seems related to how much text there is in the box.

Where's that padding coming from?  And can I get rid of it?  I want to place
icons next to the text and that spacing makes it look very odd.


BTW - These are forms because clicking on these generate a POST to change

Bill Moseley
moseley at hank.org

* * Please support the community that supports you.  * *

For unsubscribe and other options, including the Tip Harvester 
and archives of thelist go to: http://lists.evolt.org 
Workers of the Web, evolt ! 

No virus found in this incoming message.
Checked by AVG - www.avg.com 
Version: 8.5.392 / Virus Database: 270.13.31/2264 - Release Date: 07/28/09

More information about the thelist mailing list