1

I am trying to have a container such as:

<div class="container">
    <div class="row">
        <h2 style="text-align:center;">Option 1: {{ dropDown1}} Option 2: {{ dropDown2 }}</h2>
        //submit button
    </div>
</div>

Where I have two 'select' dropdowns inside my single line of text. I can have it working in the following manner for functionality:

<div class="container">
    <div class="row">
        <h2 style="text-align:center;">Select your configuration options:</h2>
        <select data-ng-options="o.name for o in options" data-ng-model="selectedOption"></select>
        <select data-ng-options="o.name for o in options2" data-ng-model="selectedOption"></select>
    </div>
</div>

Using two individual dropdown boxes (I am using angular), but these will show up below my text and not achieve the desired result I want. Any idea how I can nest these dropdowns in between text?

2 Answers 2

1

Your first select isn't closed.

To get them on the same line, give them css: 'display: inline-block' or 'float: left'. (There are more ways to do this using css, you should really learn css if you want to work with html).

Sign up to request clarification or add additional context in comments.

Comments

0

To have the <select> elements flow inside the <h2> header, use <span> elements to contain the text:

<h2 style="text-align:center;">
    <span>Option 1:</span>
    <select data-ng-options="o.name for o in options"
            data-ng-model="selectedOption">      
    </select>
    <span>Option 2: </span>
    <select data-ng-options="o.name for o in options"
            data-ng-model="selectedOption">      
    </select>
</h2>

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.