This is a migrated thread and some comments may be shown as answers.

[Solved] Empty tr tag inside Editor HTML Output

1 Answer 25 Views
Editor
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Simon Christ
Top achievements
Rank 1
Simon Christ asked on 23 Nov 2012, 04:45 PM

Hello 

I'm trying to horizontal align 2 textboxes. One is readonly (normal textarea) and the other is an Editor.

The Editor is always placed some pixels below the textarea. I can't find the problem in a stylesheet, but I found,

that there is an empty <tr/> tag on top of the table, generated by the Editor.

Is this a possible reason for this alignement problem? If yes, how can I fix this?

This is the section of my Edit.cshtml:

<tr>
    <td>
        <div class="editor-label">
            @Html.LabelFor(model => model.Beschreibung)
        </div>
    </td>
    <td>
            <div class="html-readonly">
                @MvcHtmlString.Create(@Model.Beschreibung)
                @Html.HiddenFor(model => model.Beschreibung)
            </div>
            @Html.ValidationMessageFor(model => model.Beschreibung)
    </td>
    <td>
        <div class="editor-label-gmgt-writeback">
            @Html.LabelFor(model => model.Bearbeitungsstand)
        </div>
    </td>
    <td>
        <div class="editor-multiline-field">
            @(Html.Telerik().Editor().Name("BearbeitungsstandEditor").Encode(false).HtmlAttributes(new { cellspacing = "0" }).Value(@<text> @Html.Raw(@Model.Bearbeitungsstand) </text>).Tools(tools => tools.Clear()).StyleSheets(styleSheets => styleSheets.Add("~/Content/editor.css")))
        </div>
        @Html.ValidationMessageFor(model => model.Bearbeitungsstand)
    </td>
</tr>

Attachment: Generated HTML in Browser (F12 IE9)

Thanks and regards

Simon

1 Answer, 1 is accepted

Sort by
0
Dimo
Telerik team
answered on 27 Nov 2012, 02:20 PM
Hi Simon,

I don't think the empty table row is causing the misalignment, but you can easily check this by adding at least one Editor tool.

You can try setting a vertical-align:bottom style to the textarea or set its display style to block (it's inline by default). When it's an inline element, the textarea has a default vertical-align of baseline, i.e. it is a little above the place where it could be.

Greetings,
Dimo
the Telerik team
Check out the successor of Telerik MVC Extensions - Kendo UI for ASP.NET MVC - and deem it for new ASP.NET MVC development.
Tags
Editor
Asked by
Simon Christ
Top achievements
Rank 1
Answers by
Dimo
Telerik team
Share this question
or