nbarbettini / little-aspnetcore-book

The Little ASP.NET Core Book, a friendly introduction to web programming and ASP.NET Core 2.0
http://littleasp.net/book
Creative Commons Attribution 4.0 International
702 stars 190 forks source link

Table Row Strikethrough Not Working #74

Open eohlde opened 5 years ago

eohlde commented 5 years ago

I'm not sure if it's my code or an actual error. After I test out the application (page 42), I browse to https://localhost:44305/todo but when I check the todo done box, I only get this: image

Here the lines added to site.css div.todo-panel { margin-top: 15px; } table tr.done { text-decoration: line-through; color: #888; }

Here is my Index.cshtml: `@model TodoViewModel

@{ ViewData["Title"] = "Manage your to-do list"; }

<div class="panel panel-default todo-panel">
    <div class="panel-heading">@ViewData["Title"]</div>

    <table class="table table-hover">
        <thead>
            <tr>
                <td>&#x2714;</td>
                <td>Item</td>
                <td>Due</td>
            </tr>
        </thead>

        @foreach (var item in Model.Items)
        {
            <tr>
                <td>
                    <input type="checkbox" class="done-checkbox">
                </td>
                <td>@item.Title</td>
                <td>@item.DueAt</td>
            </tr>
        }
    </table>

    <div class="panel-footer add-item-form">
        <!-- TODO: Add item form -->
    </div>
</div>`