Click here to Skip to main content
15,608,053 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
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, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900