Div + CSS naming rules.

Source: Internet
Author: User

1. css id name

Outer cover: Wrap
Main navigation: mainnav
Subnavigation: subnav
Footer: footet
Entire page: Content
Webpage: Header
Footer: footer
Standard: Label
Title: Title
Main navigation: mainbav (globalnav)
Top navigation: topnav
Side navigation: sidebar
Left Navigation: leftsidebar
Right navigation: rightsidebar
Flag: logo
Banner
Menu content 1: menu1 content
Menu capacity: menu container
Sub menu: submenu
Navigation icon: sidebaricon
Note: Note
Breadcrumb)
Container: Container
Content: Content
Search: Search
Login: Login
Functional Area: Shop (such as shopping cart and cashier)
Current

2. In addition, you can use the following annotations when editing a style sheet:

<-- Footer -->
Content Area
<-- End footer -->

3. Style File Name
Main master.css
Layout.css
Columns.css
Text font.css
Print Style print.css
Themes.css

Note: The Source is "smoke and children circle tutorial network"
CSS Name:
Header: Header
Logon entry: loginbar
Logo: logo
Sidebar: sidebar
Advertisement: banner
Navigation: nav
Subnavigation: subnav
Menu: Menu
Sub menu: submenu
Search: Search
Scroll: Scroll
Page subject: Main
Content: Content
Tab: Tab
Article list: List
Message: msg
TIPS: Tips
Topic title: Title
Join: joinus
Guide: Guild
Service: Service
Hotspot: hot
News: News
Download: Download
Registration: regsiter
Status: Status
Button: BTN
Vote: Vote
Partner: Partner
Link: friendlink
Footer: footer
Copyright: Copyright

3. Style File Name

Basic base.css
Main master.css
Layout.css
Local part.css
Columns.css
Text font.css
Print Style print.css
Themes.css

4. abbreviated name

Float left = float: left;
Float: right;
Clear floating clear = clear: both;

Left-aligned TL = text-align: left;
Right-aligned tri = text-align: right;
Center Tc = text-align: center;

Width W1 (width) = 1px ........ W1000 = 1000px
Height H1 (height) = 1px ........ H1000 = 1000px

Clear border bd_n = Border: none! Important;

Bold fw_ B = font-weight: bold;
Clear and bold fw_n = font-weight: normal;

Hide blocks dp_n = disipay: none;
Display block dp_ B = disipay: block;
Clear background color bg_n = Background: none;

Margin (upper right bottom left) m_05 = margin: 5px;
Margin (upper and lower left) m_0510 = margin: 5px 10px;
Margin (upper left and lower sides) m_051007 = margin: 5px 10px 7px;
Margin (top) mt_10 = margin-top: 10px;
Margin (right) mr_10 = margin-Right: 10px;
Margin (bottom) mb_10 = margin-bottom: 10px;
Margin (left) ml_10 = margin-left: 10px;

Padding (upper right bottom left) p_05 = Padding: 5px;
Padding (upper and lower left) p_0510 = Padding: 5px 10px;
Padding (top or bottom) p_051007 = Padding: 5px 10px 7px;
Padding (top) pt_10 = Padding-top: 10px;
Padding (right) pr_10 = Padding-Right: 10px;
Padding (bottom) pb_10 = Padding-bottom: 10px;
Padding (left) pl_10 = Padding-left: 10px;

For example, <Div class = "FL h100"> www.hemin.cn </div> // suitable for repeated calling of large websites

5. Color Naming

Black black = #000
White white = # fff
Gray = #999 #666 #333

Red gules = # f00
Yellow = # ff0
Blue blue = # 00f
Green = #0f0
Cyan cyan = # 0ff
Purple = # f0f

# F0f = # ff00ff
For example: <div> <a href = "#"> Hm </a> <a class = "gules" href = "#"> Hemin </a> </div>

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.