Click here to Skip to main content
14,236,234 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hello every body

i create label and text box in my project in mvc

the dir is rtl , i want the label in the right side how i can but the label and text box beside each other

This is design and code :[^]

What I have tried:

@using (Html.BeginForm())

    <div dir="rtl">

        <div class="form-horizontal">
            <hr />
                        <div class="form-border">
                            <div class="form-group">
                               @Html.LabelFor(model => model.Name, htmlAttributes: new { @class = "control-label col-md-2 " })
                                <div class="col-md-8">
                                    @Html.EditorFor(model => model.Name, new { htmlAttributes = new { @class = "form-control" } })
                                    @Html.ValidationMessageFor(model => model.Name, "", new { @class = "text-danger" })
Updated 24-May-19 1:33am
Richard Deeming 24-May-19 13:50pm
Bootstrap doesn't have RTL support yet. There's a few relevant discussions on their GitHub repository - for example:
Final RTL discussion · Issue #28797 · twbs/bootstrap[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100