:: Forum >> Version 2 >>

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 backgroundurl(mybutton.png1000px no-repeat; }
 
I also tried:
.mybutton .aw-ui-button backgroundurl(mybutton.png1000px no-repeat !important; }
 
I'm stumped...
LinuxFreakus
Friday, July 28, 2006
nevermind, i figured it out on my own :)
script:
obj.setClass("ui","button-custom");
obj.refreshClasses();
 
css:
.aw-ui-button-custom {
    
height23px!important;
    
backgroundurl(button-custom.png1000px no-repeat;
    
padding-right8px;
}

.
aw-ie6 .aw-ui-button-custom {
    
background-attachmentfixed/* ie right margin fix */
}

.
aw-strict .aw-ui-button-custom {
    
height19px!important;
    
padding0px 8px 4px 0px;
}

.
aw-ui-button-custom .aw-item-box {
    
padding0px;
    
text-indent8px;
    
backgroundurl(button-custom.png0px -50px no-repeat;
}

.
aw-strict .aw-ui-button-custom .aw-item-box {
    
margin:  0px 0px -4px 0px;
    
padding0px 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
Friday, July 28, 2006



This topic is archived.

Back to support forum

Forum search