Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Defining CSS Properties

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Hello. I have been researching /playing with CSS for about a week now...i think i pretty much see how it works, although there are a couple things i'm curious about. For example, i was wondering, if when defining properties in the style sheet, are there any "best practices" or general order in which they are defined? Or does this make absolutely no difference?
 
i don't think there are any best practices for the order of css properties, but i usually try and seperate my classes from my redefined html tags, for ease of use when editing.

eg.

<STYLE>
BODY { font-family: Verdana; font-size: 12px; }
TD { background-color: #FF0000; }

.bigText { font-size: 18px; }
.bigBlueText { font-size: 18px; color: #0000FF; }
</STYLE>


other than that i just try and make it look nice, so i can find what i want easily. if you have a particularly large set of styles, you could try seperating them into sections and add comments to them.

hope this helps,

ss...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top