jQuery UI Widgets › Forums › Dialogs and Notifications › Window › Customized Header
This topic contains 5 replies, has 2 voices, and was last updated by BrentH 10 years ago.
-
AuthorCustomized Header Posts
-
Is it possible you could show a demo, sample or tutorial of how to customize a window header – including changing the close icon? I have looked through the documentation and tried to do what it said, but got no change. Is it even possible?
Hi BrentH,
If you add the following style to your page, the jqxWindow close button will be changed:
<style type="text/css"> .jqx-window-close-button { background-image: url("http://png-3.findicons.com/files/icons/756/ginux/16/close.png"); } </style>
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/I have verified that I can see your (Or my) URL, but it only blanks out the icon and doesn’t replace the icon. I just copy/pasted what you have into my project. Is there a javascript that I have to include?
Hi BrentH,
You only need this style to override the default one from jqx.base.css. Here is a complete, working example:
<!DOCTYPE html> <html> <head> <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" /> <style type="text/css"> .jqx-window-close-button { background-image: url("http://png-3.findicons.com/files/icons/756/ginux/16/close.png"); } </style> <script type="text/javascript" src="../../scripts/jquery-1.11.1.min.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxcore.js"></script> <script type="text/javascript" src="../../jqwidgets/jqxwindow.js"></script> <script type="text/javascript"> $(document).ready(function () { $("#jqxwindow ").jqxWindow({ height: 90, width: 150 }); }); </script> </head> <body> <div id='content'> <div id='jqxwindow'> <div> Header</div> <div> Content</div> </div> </div> </body> </html>
Best Regards,
DimitarjQWidgets team
http://www.jqwidgets.com/I have this sample working.
But, if I want to use another style, like ui-smoothness, it doesn’t seem to work. Do I have to change everything in the style?
Do I have to create a new style (just to change one thing)? Even if I just substitute the URL in the style file, it won’t work. Am I stuck using base.css only if I want to change something?OK, I have to reset the background-position as well.
-
AuthorPosts
You must be logged in to reply to this topic.