jQuery UI Widgets Forums Getting Started Why elements are not at the same level?

This topic contains 2 replies, has 2 voices, and was last updated by  digikv 6 months, 3 weeks ago.

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
  • Why elements are not at the same level? #103690

    digikv
    Participant

    Why input tag and combo div are not at the same level?

    <!DOCTYPE html>
    <html lang=”en”>
    <head>
    <title>jQuery ComboBox</title>
    <link rel=”stylesheet” href=”../../jqwidgets/styles/jqx.base.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/jqxbuttons.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxscrollbar.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxlistbox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxcombobox.js”></script>
    <script type=”text/javascript” src=”../../jqwidgets/jqxinput.js”></script>
    </head>
    <body>
    <div id=’content’>
    <script type=”text/javascript”>
    $(document).ready(function () {
    var source = [
    “Affogato”,
    “Americano”,
    “Bicerin”,
    “Breve”,
    “Café Bombón”,
    “Café au lait”,
    “Caffé Corretto”,
    “Café Crema”,
    “Caffé Latte”,
    ];
    // Create a jqxComboBox

    $(“#result”).jqxInput({ width: ‘100px’, height: ’25px’});
    $(“#jqxcombobox”).jqxComboBox({ source: source, selectedIndex: 0, width: ‘200px’, height: ’25px’ });
    // disable the sixth item.
    $(“#jqxcombobox”).jqxComboBox(‘disableAt’, 5);
    // bind to ‘select’ event.
    $(‘#jqxcombobox’).bind(‘select’, function (event) {
    var args = event.args;
    var item = $(‘#jqxcombobox’).jqxComboBox(‘getItem’, args.index);
    $(“#result”).val(item.label);
    });
    });
    </script>
    <input id=”result” disabled=”” value=”Result”>
    <div style=”display: inline-block;” id=’jqxcombobox’>
    </div>
    </div>
    </body>
    </html>

    Why elements are not at the same level? #103691

    admin
    Keymaster

    Dear Customer,

    ComboBox is a Block-Element, Input is Inline element. That is the reason. You can put them in a DIV tag with FLEX or GRID layout if you wish to make them on the same level. If you use a browser which does not support FLEX and GRID layouts, use the TABLE tag with TR and TD elements.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    https://www.jqwidgets.com

    Why elements are not at the same level? #103693

    digikv
    Participant

    OK. All right.

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.