Are there any CSS standards that I should follow while writing my first stylesheet?

前端 未结 17 622
有刺的猬
有刺的猬 2020-12-13 02:40

I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following.

I would appreci

17条回答
  •  失恋的感觉
    2020-12-13 03:35

    You've already gotten a good set of answers regarding your question put here is a point you may find usefull.

    Use Firefox with Firebug extension. If you don't have firefox I recommend you install it even if it's just for this. Firebug allows you to select element from the page and shows you th applied css. Then you can edit this css with the fire bug without any page reloads. Once you're happy with a style you can easily copy the definitions from firbug to your css editor.

    At least for me firebug is an absolute necessity when working with styles.

    Couple of tips for the css itself. When defining your styles use id's only when the element in question is unique. That way your styles are reusable. Use hierarchical definitions eg. #header .navigationElement a{color:red;} and #footer .navigationElement a{color:black;} That way you can move youre html code around and the correct style is applied automaticly.

提交回复
热议问题