Skip to content
Grav 2.0 is officially stable. Read the announcement →

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Forms & Blueprints

How to horizontal radioboxes or checkboxes

form

Started by Mark 8 years ago · 2 replies · 923 views
8 years ago

Hi,

Any idea how to align radio or checkboxes on one line (horizontally) in form?

see html below:

<div class="form-field horizontaaltje ">
<div class="form-label ">
<label class="inline">
Titel

HTML
                                    </label>
            </div>
                    <div class="form-data " data-grav-field="radio" data-grav-disabled="true" data-grav-default="&quot;markdown&quot;">

    <div class="radio  ">
        <input type="radio" value="dhr" id="titelmv-dhr" name="data[titelmv]">
        <label style="display: inline" class="inline" for="titelmv-dhr">Dhr.</label>
    </div>

    <div class="radio  ">
        <input type="radio" value="mevr" id="titelmv-mevr" name="data[titelmv]">
        <label style="display: inline" class="inline" for="titelmv-mevr">Mevr.</label>
    </div>

        </div>
        </div>
8 years ago

Did you try putting both inputs and their respective labels in one div with the radio class? It works html wise.

8 years ago

Well this can be done with some CSS.

TXT
.radio { display: inline-block }
👍 1

Suggested topics

Topic Participants Replies Views Activity
Forms & Blueprints · by Ton Haarmans, 5 years ago
13 1136 4 months ago
Forms & Blueprints · by Hugo Oliveira, 5 months ago
0 61 5 months ago
Forms & Blueprints · by Flachy Joe, 6 months ago
9 134 6 months ago
Forms & Blueprints · by Augustus, 7 months ago
7 110 7 months ago
Forms & Blueprints · by Julien, 7 months ago
10 129 7 months ago