Skip to content

Commit d901635

Browse files
authored
added scroll feature
1 parent c88e47d commit d901635

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

Views/Home/Index.cshtml

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
@if (Model.Results.Count > 0)
2323
{
2424
<h4>Search Results: (@Model.Results.Count) </h4>
25+
<div class="results-wrapper">
2526
<ul class="list-group">
2627
@for (int i = 0; i < Model.Results.Count; i++)
2728
{
@@ -32,6 +33,7 @@
3233
</li>
3334
}
3435
</ul>
36+
</div>
3537
}
3638

3739
}
@@ -49,7 +51,6 @@
4951
font-weight: bold;
5052
font-family: 'Noto Nastaliq Urdu', 'Amiri', serif;
5153
}
52-
5354
.container {
5455
max-width: 800px;
5556
margin: 50px auto;
@@ -69,6 +70,9 @@
6970
background-color: #f8f9fa;
7071
border: 1px solid #ddd;
7172
border-radius: 4px;
73+
word-wrap: break-word;
74+
overflow-wrap: break-word;
75+
white-space: pre-wrap;
7276
}
7377
.list-group-item.odd {
7478
background-color: #f8f9fa;
@@ -77,4 +81,14 @@
7781
.list-group-item.even {
7882
background-color: #d1ecf1;
7983
}
80-
</style>
84+
.results-wrapper {
85+
overflow-x: auto;
86+
}
87+
88+
@media (max-width: 768px) {
89+
.results-wrapper {
90+
max-width: 100%;
91+
overflow-x: scroll;
92+
}
93+
}
94+
</style>

0 commit comments

Comments
 (0)