Documentation

Styling and Appearance

jQWidgets uses a pair of css files - jqx.base.css and jqx.[theme name].css. The base stylesheet creates the styles related to the widget's layout like margin, padding, border-width, position. The second css file applies the widget's colors and backgrounds. The jqx.base.css should be included before the second CSS file.

Below is the list of CSS classes used by jqxDocking.
  • jqx-docking - applied to the docking's main div.
  • jqx-docking-panel - applied to the different docking panels.
  • jqx-docking-drop-indicator - applied to the jqxdocking's drop indicator.
  • jqx-docking-window - applied to the windows which are inside the docking.
*jqxDocking internally use the jqxWindow widget. For additional information about styling jqxWindow, please take a look at the jqxWindow's Styling and Appearance help topic.

When you create a custom style with colors and backgrounds for jqxDocking panels, you need to do the following:
  • Add the above CSS classes related to jqxDocking
  • After each CSS class, add your theme name.
    For example:
    jqx-docking-panel-shinyblack
  • To apply your custom style to jqxDocking, you need to set its 'theme' property (option) to point to your theme name string.
    <script type="text/javascript">
    $(document).ready(function () {
    // Create jqxTooltip
    $("#jqxdocking").jqxDocking({ theme: 'shinyblack', width: 250 });
    });
    </script>
  • The sample below demonstrates how to set the 'Shiny Black' theme to jqxDocking.
    <!DOCTYPE html>
    <html lang="en">
    <head>
    <title id='Description'>jQuery jqxDocking Sample</title>
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.base.css" type="text/css" />
    <link rel="stylesheet" href="../../jqwidgets/styles/jqx.shinyblack.css" type="text/css" />
    <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/jqxdocking.js"></script>
    <script type="text/javascript" src="../../jqwidgets/jqxwindow.js"></script>
    <script type="text/javascript">
    $(document).ready(function () {
    // Create jqxDocking
    $("#docking").jqxDocking({ width: 250, theme: 'shinyblack' });
    });
    </script>
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-2FX5PV9DNT"></script><script>window.dataLayer = window.dataLayer || [];function gtag(){dataLayer.push(arguments);}gtag('js', new Date());gtag('config', 'G-2FX5PV9DNT');</script></head>
    <body class='default'>
    <div id="docking">
    <div>
    <div id="window1">
    <div>Header 1</div>
    <div>Content 1</div>
    </div>
    <div id="window2">
    <div>Header 2</div>
    <div>Content 2</div>
    </div>
    </div>
    </div>
    </body>
    </html>