CodexBloom - Programming Q&A Platform

HTML Semantic Elements Not Applying CSS Styles in Edge - Investigating Specificity Issues

πŸ‘€ Views: 134 πŸ’¬ Answers: 1 πŸ“… Created: 2025-06-17
html css microsoft-edge HTML

I can't seem to get I tried several approaches but none seem to work... I'm working with a peculiar scenario with CSS styles not being applied to HTML semantic elements like `<header>`, `<footer>`, and `<article>` when viewed in Microsoft Edge (version 114). My styles work perfectly in Chrome and Firefox, but in Edge, the font size and color are not reflecting as expected. I've ensured that my CSS rules are properly formed: ```css header { font-size: 20px; color: navy; } footer { font-size: 16px; color: gray; } article { font-size: 18px; color: darkgreen; } ``` I also checked that there are no overriding styles from other stylesheets or inline styles. I tried adding `!important` to the styles as a test, but that didn't resolve the scenario either. Additionally, I've validated my HTML structure, and it seems to be semantically correct. Here’s the relevant part of my HTML: ```html <header> <h1>Welcome to My Site</h1> </header> <article> <p>This is an article section.</p> </article> <footer> <p>Footer Information</p> </footer> ``` I've also attempted to use different CSS methods, like inline styles and scoped styles, but the question continues only in Edge. Are there known issues related to CSS specificity or rendering with these semantic elements in Edge? I would appreciate any insights or suggestions on how to troubleshoot this further. I'm working on a application that needs to handle this. Has anyone else encountered this? I recently upgraded to Html 3.11. Any advice would be much appreciated. I've been using Html for about a year now.