CSS not working in stylesheet

前端 未结 7 1134
傲寒
傲寒 2020-12-11 16:52

I have a set of Styles that were first created inside the style attribute on a page.

I want to move it from being on the page itself into a stylesheet.

howe

7条回答
  •  抹茶落季
    2020-12-11 17:28

    This is just a shot in the dark as (at the time of this post) you haven't provided source code.

    Make sure you're linking to your stylesheet using a link tag in the head of the HTML document.

    If you had:

    
    

    You'll need to have

    #someid
    {
      margin: 0;
      padding: 3px 12px;
    }
    

    in your CSS file with:

    
    

    to link to the stylesheet.

    Some common newbie mistakes include: