In this post, we'll see how to change the look n feel of popup component by skinning the ADF dialog box using CSS code in ADF Application. Skinning plays important role in designing a better user interface, You can read more about ADF Skinning here.
Default ADF dialog component inside popup looks like this
And here I'll show you how to customize the look of dialog box using ADF Skin (CSS Code), I hope you all know about creating ADF Skin file. After creating the Skin file put the CSS script mentioned below in that file.
See ADF Skin code used to customize ADF dialog box.
/**Change background color and border color of dialog**/ af|dialog { background-color: White; border-color: #4267b2; } /**Change dialog header style**/ af|dialog::header, af|dialog::header-end, af|dialog::header-start, af|dialog::title { color: #FFFFFF; text-align: center; background-color: #45619d; background-image: none; font-family: Arial; padding: 3px; } /**Change dialog button styler**/ af|dialog af|button { background-color: #4267b2; text-align: center; vertical-align: middle; color: White; background-image: none; border: #4267b2 1.5px solid; width: 60px; } af|dialog af|button::link { background-color: #4267b2; text-align: center; vertical-align: middle; color: White; background-image: none; border: #4267b2 1.5px solid; font-family: Arial; } /**Set hover event properties for dialog button**/ af|dialog af|button:hover { background-color: red; text-align: center; vertical-align: middle; color: White; background-image: none; border: #528cff 1.5px solid; width: 60px; } af|dialog af|button::link:hover { background-color: #528cff; text-align: center; vertical-align: middle; color: White; background-image: none; border: #528cff 1.5px solid; font-family: Arial; } /**Change default close icon of dialog**/ af|dialog::close-icon-style { background: none; background-image: url("../../lblue_cross_16.png"); height: 17px; } af|dialog::close-icon-style:hover { background: none; background-image: url("../../red_cross_16.png"); height: 17px; }
And after skinning, ADF dialog box looks like this
Cheers :) Happy Learning