Sorush
Sorush

Reputation: 4129

Why Bootstrap panel is not working in Blazor client?

I compile below code to get a bootstrap panel but no success

enter image description here

@page "/test"
<h3>test</h3>

<div class="panel panel-primary">
    <div class="panel-heading">Panel with panel-primary class</div>
    <div class="panel-body">Panel Content</div>
</div>

@code {

}

the project setting is enter image description here

And bootstrap.main.cs is

enter image description here

The wwwroot folder looks like this

enter image description here

Index.html

enter image description here

Upvotes: 0

Views: 2288

Answers (2)

Henk Holterman
Henk Holterman

Reputation: 273179

Blazor uses Bootstrap 4 and there .panel was replaced by .card

So the basic version becomes this:

<div class="card text-primary">
    <div class="card-header">Panel with panel-primary class</div>
    <div class="card-body">Panel Content</div>
</div>

Upvotes: 5

ფიდო
ფიდო

Reputation: 1

add in Index.html Head section

<link href="Bootstrap/bootstrap.mini.css" rel="stylesheet" />

Upvotes: -2

Related Questions