Skip to content

Button background not showing #2

Description

@wbaaron

On Magento 1.5.1, the background for buttons doesn't appear correctly. The issue is because the button html is setup as

<button><span>Button Text</span></button>

instead of

<button><span><span>Button Text</span></span></button>

I've fixed this issue by updating lines 524-532 of boxes.css to

button { overflow:visible; width:auto; border:0; padding:0 4px 0 0; margin:0 8px 0 2px; background:transparent url(images/bkg_btn.png) 100% 0 no-repeat; cursor:pointer; }
button span { float:left; height:28px; background:transparent url(images/bkg_btn.png) 0 0 no-repeat; padding:0 0 0 8px; font:bold 12px/27px Tahoma, Verdana, Arial, sans-serif; text-align:center; white-space:nowrap; color:#f15a24; position:relative; right:4px; }

button:not(.disabled):hover { background-position:100% -70px; }
button:not(.disabled):hover > span { background-position:0 -70px; }
button:not(.disabled):active { position:relative; bottom:-1px; right:-1px; }

I haven't tested it too thoroughly. I haven't seen any problems yet though, so I think it should be good.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions