How do style my web page.

Emmanuel Y. Zeahn 0 Reputation points
2025-01-10T12:44:10.31+00:00

Facing issues with the theme taking effect when I applied the codes via visual studio code.

This question is related to the following Learning Module

Visual Studio Training
Visual Studio Training
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Training: Instruction to develop new skills.
30 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Pradeep M 5,275 Reputation points Microsoft Vendor
    2025-01-13T05:41:12.58+00:00

    Hi Emmanuel Y. Zeahn,

    Thank you for reaching out to Microsoft Q & A forum 

    To resolve the issue with the theme not taking effect, first ensure that your CSS file is properly linked to the HTML file using the <link rel="stylesheet" href="main.css"> tag. Verify that the correct theme class, such as light-theme or dark-theme, is applied to the <body> element. Additionally, confirm that your CSS variables are correctly defined in the :root selector and are being used properly within your theme classes. If necessary, clear your browser cache or refresh the page (Ctrl+F5 or Cmd+Shift+R) to load the most recent styles. Finally, you can use the browser's developer tools to inspect the page and verify that the styles are being applied as expected. 

    Please feel free to contact us if you have any additional questions.     

    If you have found the answer provided to be helpful, please click on the "Accept answer/Upvote" button so that it is useful for other members in the Microsoft Q&A community.  

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.