Hello, I am now working on a .NET MVC app and have a problem with my partial view. It renders within main view, but the top of the partial view which I mentioned before is being cut at the top.
Here are pictures:
This is how it looks now
This is how it should look like
My code:
Partial view:
@using EPiServer.Framework.Web.Resources
@using Brands = Rockwool.RockWorld.BusinessLogic.Enums.Brands
@{
Layout = "~/Views/Layouts/ToolsLayout.cshtml";
ViewBag.SectionTitle = "Generate Reports: Organism, Page, Activity";
}
@Html.Raw(Html.ShellInitializationScript())
<div class="epi-contentContainer epi-padding">
<div class="epi-contentArea">
<h1 class="EP-prefix">
Create page report
</h1>
<p class="EP-systemInfo">This tool will generate report about current pages used by Episerver. Report is created in exported in Excel file. The download button tries to download the latest version from the server. The generate button tries to create a new version of the report, it may take some time</p>
<div class="form-container">
@using (Html.BeginForm("DownloadReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.Hidden("requestReportName", "PageReport");
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-Export" type="submit" name="btnSubmitDownloadPageReport" id="btnSubmitDownloadPageReport" value="Download Report" />
}
</div>
<div class="form-container">
@using (Html.BeginForm("GeneratePageReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-File" type="submit" name="btnSubmitGeneratePageReport" id="btnSubmiGeneratetPageReport" value="Generate Report" />
}
</div>
</div>
</div>
<div class="epi-contentContainer epi-padding">
<div class="epi-contentArea">
<h1 class="EP-prefix">
Create product report
</h1>
<p class="EP-systemInfo">This tool will generate report about current products existing in Commerce. Report is created and exported to Excel file. The download button tries to download the latest version from the server. The generate button tries to create a new version of the report, it may take some time</p>
<div class="form-container">
@using (Html.BeginForm("DownloadReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.Hidden("requestReportName", "ProductReport");
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-Export" type="submit" name="btnSubmitDownloadPageReport" id="btnSubmitDownloadPageReport" value="Download Report" />
}
</div>
<div class="form-container">
@using (Html.BeginForm("GenerateProductReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-File" type="submit" name="btnSubmitGeneratePageReport" id="btnSubmiGeneratetPageReport" value="Generate Report" />
}
</div>
</div>
</div>
<div class="epi-contentContainer epi-padding">
<div class="epi-contentArea">
<h1 class="EP-prefix">
Create activity logs report
</h1>
<p class="EP-systemInfo">This tool will generate report about activity logs. Report is created and exported to Excel file. The download button tries to download the latest version from the server. The generate button tries to create a new version of the report, it may take some time</p>
<div class="form-container">
@using (Html.BeginForm("DownloadReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.Hidden("requestReportName", "ActivityLogsReport");
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-Export" type="submit" name="btnSubmitDownloadActivityLogsReport" id="btnSubmitDownloadActivityLogsReport" value="Download Report" />
}
</div>
<div class="form-container">
@using (Html.BeginForm("GenerateActivityLogsReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-File" type="submit" name="btnSubmiGeneratetActivityLogsReport" id="btnSubmiGeneratetActivityLogsReport" value="Generate Report" />
}
</div>
</div>
</div>
<div class="epi-contentContainer epi-padding">
<div class="epi-contentArea">
<h1 class="EP-prefix">
Create Rockwool Master obsolete content report
</h1>
<p class="EP-systemInfo">This tool will generate report about all obsolete content used on RockwoolMaster 2.0 including all commerce catalogs assigned to page</p>
<div class="form-container">
@using (Html.BeginForm("DownloadReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.Hidden("requestReportName", "RockwoolObsoleteContentPageReport");
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-Export" type="submit" name="btnSubmitDownloadRockwoolObsoleteContentPageReport" id="btnSubmitDownloadRockwoolObsoleteContentPageReport" value="Download Report" />
}
</div>
<div class="form-container">
@using (Html.BeginForm("GenerateRockwoolObsoleteContentReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-File" type="submit" name="btnSubmitGenerateRockwoolObsoleteContentReport" id="btnSubmitGenerateRockwoolObsoleteContentReport" value="Generate Report" />
}
</div>
</div>
</div>
<div class="epi-contentContainer epi-padding">
<div class="epi-contentArea">
<h1 class="EP-prefix">
Report of pages with deleted images
</h1>
<p class="EP-systemInfo">This tool will generate report about all pages, which have deleted images inside. They are incorrect, so we need to fix them.</p>
<div class="form-container">
@using (Html.BeginForm("DownloadReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
@Html.Hidden("requestReportName", "PagesWithDeletedImagesReport");
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-Export" type="submit" name="btnSubmitPagesWithDeletedImagesReport" id="btnSubmitPagesWithDeletedImagesReport" value="Download Report" />
}
</div>
<div class="form-container">
@using (Html.BeginForm("GeneratePagesWithDeletedImagesReport", "Admin/Report", FormMethod.Post, new { enctype = "multipart/form-data" }))
{
<input class="epi-cmsButton-text epi-cmsButton-tools epi-cmsButton-File" type="submit" name="btnSubmitPagesWithDeletedImagesReport" id="btnSubmitGenerateRockwoolObsoleteContentReport" value="Generate Report" />
}
</div>
</div>
</div>
Main view:
@using EPiServer.Shell.Navigation
@{
ViewBag.SectionTitle = string.Empty;
}
<!DOCTYPE html>
<html lang="en">
<head>
<title>@ViewBag.Title</title>
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.1.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-1BmE4kWBq78iYhFldvKuhfTAU6auU8tT94WrHftjDbrCEXSU1oBoqyl2QvZ6jIW3" crossorigin="anonymous">
<style>
.form-container {
display: inline-block;
}
.copy-button {
cursor: pointer;
}
textarea {
margin-top: 0px;
margin-bottom: 0px;
height: 38px;
}
.App {
position: absolute;
z-index: 1060;
}
.epi-buttonDefault {
display: flex;
}
@* .epi-contentContainer epi-padding {
margin-top: 200px;
} *@
.loader {
border: 5px solid #f3f3f3;
border-top: 5px solid #3498db;
border-radius: 50%;
width: 14px;
height: 14px;
animation: spin 2s linear infinite;
}
@@keyframes spin {
0% { transform: rotate(0deg); }
100% { transform: rotate(360deg); }
}
</style>
</head>
<body>
@Html.Raw(Html.CreatePlatformNavigationMenu())
<div id="epi-navigation-container" @Html.ApplyPlatformNavigation()></div>
<div>
@RenderBody()
</div>
</body>
</html>
What I have tried:
I have tried adding spacing utilities like (mt-5 and pt-5) to class names and custom CSS to increase padding and margin between elements, yet nothing worked.
What am I doing wrong?