3.2.0

Help: change button background image

I'm trying to figure out how to change the default look and feel of the AW.UI.Button object.
Obviously, I can just make my own button.png file and then put that in the appropriate AW CSS folder, but then *all* the buttons would look that way.

I want to find out how to just change it only for certain buttons. I made my own CSS stylesheet and placed the buttons I want to look different inside a div with class="mybutton" ... why doesn't this work?

.mybutton.aw-ui-button { background: url(mybutton.png) 100% 0px no-repeat; }


I also tried:
.mybutton .aw-ui-button { background: url(mybutton.png) 100% 0px no-repeat !important; }


I'm stumped...
LinuxFreakus
July 28,
nevermind, i figured it out on my own :)
script:
obj.setClass("ui","button-custom");
obj.refreshClasses();

css:
.aw-ui-button-custom {
    height: 23px!important;
    background: url(button-custom.png) 100% 0px no-repeat;
    padding-right: 8px;
}

.aw-ie6 .aw-ui-button-custom {
    background-attachment: fixed; /* ie right margin fix */
}

.aw-strict .aw-ui-button-custom {
    height: 19px!important;
    padding: 0px 8px 4px 0px;
}

.aw-ui-button-custom .aw-item-box {
    padding: 0px;
    text-indent: 8px;
    background: url(button-custom.png) 0px -50px no-repeat;
}

.aw-strict .aw-ui-button-custom .aw-item-box {
    margin:  0px 0px -4px 0px;
    padding: 0px 0px 4px 0px;
}


I may not really need quite that much CSS in my own stylesheet, I might be able to take some out and still have it work, but at least it works now :)
LinuxFreakus
July 28,

This topic is archived.

See also:


Back to support forum