Theomax
Theomax

Reputation: 6792

IE7 bug - can't make button float right

I have a page that contains a button and a footer. I can't make the button float right. I have the following code:

<div style="float: right;">
    <asp:Button ID="btnSubmit" OnClick="btnSubmit_Click" runat="server" Text="Save"
        CssClass="button defaultbutton" />
</div>
<div style="clear:both;"></div>

I did some research on the net and found it is a known bug: Fixing IE6/7 problems when using floated elements inside of a button element

But adding the CSS from the link didn't fix the problem.

Any ideas on how to fix this?

Here is the CSS for button:

display: inline;
color: #ffffff;
font-family: arial;
font-size: 12px;
font-weight: bold;
text-decoration: none;
width: auto;
margin-left: 0;
margin-right: 0;
margin-top: 5px;
margin-bottom: 3px;
padding: 6px 24px;
border-radius: 2px;

And here is the CSS for defaultbutton:

background: #f24537;
border: 1px solid #d02718;
text-shadow: 1px 1px 0 #810e05;

Upvotes: 1

Views: 760

Answers (1)

Hawken
Hawken

Reputation: 2119

I've tested what I think is the resulting code produced by ASP.

The exact page I'm testing is here: http://jsbin.com/ololot.

I've tried it out in IE7 here: https://i.sstatic.net/cuXIf.png

In Firefox on the same machine here: https://i.sstatic.net/vh0i3.png

Unless the problem is the difference in padding, I don't seem to be able to replicate your problem.

I'll edit the answer upon further information.

Upvotes: 1

Related Questions