Search This Blog

Prefixing Classes and IDs

Prefixing custom classes and IDs allow you to easily differentiate your custom code from MOSS code when examining the source code of a page or using DOM explorer.

Prefix the classes and IDs in your custom CSS file with the project's abbreviation or initials. For example:

#EMAG_header{                                                     .EMAG_sidebarTop{
}                                                                               }
#EMAG_leftColumn{                                               .EMAG_sidebarFill{
}                                                                               }
#EMAG_rightColumn{                                             .EMAG_sidebarBtm{
}                                                                               }
#EMAG_footer{                                                      .EMAG_utilitylink{
}                                                                               }