Image inside a button not positioned correctly in Firefox
Posted
by Dominic Rodger
on Stack Overflow
See other posts from Stack Overflow
or by Dominic Rodger
Published on 2010-03-07T18:39:24Z
Indexed on
2010/03/08
21:36 UTC
Read the original article
Hit count: 265
I have the following markup:
<p class="managebox">
<button value="Add page">
<img src="page_add.png" alt="Add more content" />
Add Page
</button>
</p>
And the following CSS:
p.managebox { position: relative; }
p.managebox button { display: block;
padding: 5px 7px 4px 30px;
position: relative; }
p.managebox button img { position: absolute; left: 7px; }
In IE 8 I get this:
In Chrome 4.0 I get this:
In Firefox 3.6 I get this:
Does anyone know what I'm doing wrong? One thing I've just realised that may be relevant - if I use an a
instead of button
, it works fine.
© Stack Overflow or respective owner