I am trying to add a custom banner to the SharePoint Online Page (Classic experience). Unfortunately, the banner is overlapping other elements of the page.
This is what I am doing:
- Created the code in notepad and saved it as .txt
- Uploaded .txt to "Documents" library
- Added .txt via the Content Editor Web Part
<div class="container">
<img src="/sites/XXXX/XXX/testclassic/SiteAssets/SitePages/Home/TEST BANNER.png" width="100%">
<div class="centerleft">TEST TEXT TEST TEXT TEST TEXT TEST TEXT</div>
</div>
<style>
.container {
position: relative;
text-align: center;
color: white;
}
.centerleft {
position: absolute;
top: 50%;
left: 16px;
}
</style>
Output:
position: absolute;
forcenterleft
class? Try changing its value.