Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

CSS: Why is my body selector not working?

I’m currently doing some CSS work for my class and for some reason the body selector won’t work. The other selectors in the style tag work but this one doesn’t work. Not really sure why so help would be greatly appreciated.

    <style type="text/css">

    @import "navbar.css"

    body {
      font-size: 1.1em;
      font: Arial, Helvetica, sans-serif;
      background-color: #0d4a2c;
      line-height: 1.25em;
    }

    * {
      margin: 0;
      padding: 0;
    }

    #container {
      width: 90%;
      margin: 0 auto;
      border: 1px solid;
      background-color: #c2efd8;
    }

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Looks like a missing ; after your @import "navbar.css".

<style type="text/css">

    @import "navbar.css";

    body {
      font-size: 1.1em;
      font: Arial, Helvetica, sans-serif;
      background-color: #0d4a2c;
      line-height: 1.25em;
    }

    * {
      margins: 0;
      padding: 0;
    }

    #container {
      width: 90%;
      margins: 0 auto;
      border: 1px solid;
      background-color: #c2efd8;
    }

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading