Home > Web Front-end > HTML Tutorial > New to DIV CSS? There are six issues that need attention_html/css_WEB-ITnose

New to DIV CSS? There are six issues that need attention_html/css_WEB-ITnose

WBOY
Release: 2016-06-24 12:29:45
Original
1264 people have browsed it

Beginner to DIV CSS? There are six questions that require your attention! As a beginner of DIV CSS, if you have a clear understanding of the overall structure of the web page before writing code, you will get twice the result with half the effort! However, there are always problems of one kind or another during the writing process, which makes us have to stop and look up information, clarify attribute definitions, etc.!
In fact, there are many ways to improve my efficiency while giving us a deeper understanding of DIC CSS! Below we list a few points:

1. CSS naming convention:
1. File naming convention
Global style: global.css;
Frame layout: layout.css;
Font Style: font.css;
Link style: link.css;
Print style: print.css;
2. Common class/ID naming conventions
Header: header
Content: content
Container: container
Footer: footer
Copyright: copyright
Navigation: menu
Main navigation: mainMenu
Sub-navigation: subMenu
Logo: logo
Slogan: banner
Title: title
Sidebar: sidebar
Icon: Icon
Note: note
Search: search
Button: btn
Login: login
Link: link
 Information box: manage
……

2. Dealing with browser BUG issues
Regarding this point, I wonder if that expert turned CSS BUG into a jingle! Quote it here, it’s easy to remember!
1. If the IE border appears or disappears, please note that the height setting must have been forgotten;
2. There is a reason why the float is generated. If the parent layer wants to contain it, the float must be cleared immediately, and the container will naturally appear in it;
3. Don’t panic when moving three-pixel text slowly, the height setting will help you;
4. Please note that it is compatible with all browsers, the default setting of line height may be a killer;
5. Remember to clear floating independently, No high-end design, no high-end design, design effect and browsing;
6. Learning layout requires ideas, the layout principle is natural and straight, easy to control HTML, streamlined layout with less hacks, clean code, good compatibility, friendly engines like to welcome.

3. All tags are active
It’s just that the default is different, span is Wuji, Wuji produces two instruments? Inline and block level, img is special, but it also follows the legal principles, the others are just different modifications , a * sign will all return to the original, the layering style requires more practice, everything is regular.

4. Be careful with image link typesetting
If the image link text link is aligned, padding and vertical-align:middle must be set. It doesn’t matter if the difference is slight.

5. IE floating double margins
Please use display: inline.

6. Horizontal layout of the list
List codes must be close together, and the gaps must be remembered.

DIC CSS learning is a long road, and you must have a pious new heart to truly follow it!

source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template