My Angular calendar application runs smoothly without any errors. However, I am encountering an issue where the CSS styles are not being applied to the page.
When I implemented this separately, everything worked fine. But as soon as I included it in my Angular project, the CSS stopped working. The problem lies in referencing the 'div' that contains the content.
Below is the code snippet:
holidays.ts
@Component({
templateUrl: './holidays.component.html',
styleUrls: ['./../../../webroot/css/pages/holidays/only_holidays.min.css'],
styles: [`
`],
})
export class HolidaysPageComponent extends AppComponent {
ngOnInit(){
this.testFunction();
}
// More functional code here...
}
Contents of only_holidays.css:
body{
background-color: #F5F1E9;
}
#calendar{
margin-left: auto;
margin-right: auto;
width: 520px;
font-family: 'Lato', sans-serif;
}
// CSS styles continue...
The issue seems to be with the way the styles refer to the 'div.' For more details and to access the full code visit: Codepen Link