Some experts on Bi specifically discussed this layout method, but he used a lot of hack and avoided the DTD of IE6. In actual use, after I find that the DTD definition of IE6 is avoided, the Ajax modal box cannot be centered (a control of Vs,
Xmlns = "http://www.w3.org/1999/xhtml">
Fixed LayoutAlgorithm. In this algorithm, the horizontal layout is based only on the table width, the table Border width, the cell spacing, and the column width. It is not related
Figure:
This effect is even the News Module with three columns and four columns. I used table in the past and thought it was more convenient than CSS. After a floating occurs, Ul was used, it is easier to control. Let's take a look at the Code:
Click to view the effect:
Xmlns = "http://www.w3.org/1999/xhtml">
The style of the following two divs is basically the same, but the first plug-in (understand what I mean) style: Background-color is followed by! Important. Therefore,
1. Move and select form text input:
In the text input column, if a prompt is added, visitors usually need to select and delete it with the mouse, and then enter useful information. In fact, you only need to add onmouseover = "This. Focus ()"
There are three common methods to clear floating.
Floating is not cleared.
Source code , Run
Code The light yellow background of the parent element cannot be viewed.
leftright
[Ctrl + A select all Note: If you need to introduce
The block-level element Div should be used as little as possible. In fact, like the table, the smaller the number of nesting, the better, it will also affect the speed!
Ol ordered list. ...... ...... ...... Performance:1 ......2 ......3
Example:
* [Lang = fr] {font-size: 14px; width: 120px ;}
*. Div {text-Decoration: none ;}
2. Type SelectorSyntax:
E {srules}
Note:Type selector. Take the document language object (element) type as the selector.Example:
TD {font-size: 14
1. Break down your style
For small projectsCodePreviously, the code was divided into several parts by PAGE structure or page content and annotated. For example, you can separate global styles, la S, font styles, forms, comments, and others
1. Check whether the HTML element has a spelling error and whether it has forgotten the ending mark.
Even veteran engineers often mistake the DIV nesting relationship. You can use the Dreamweaver verification function to check whether there are any
For example, there are four Li in UL whose width is 210px, and the four Li's widths are 80px, 120px, 140px, and 80px according to their own content length.
The effect I need is that four Li nodes are automatically arranged to the left. When the sum
CSS shows the excess part as a ellipsis. This method is compatible with Firefox _ script house _ www.jb51.net.
technical space of suntear
technical space of suntear
technical space of suntear
technical space of suntear
This attribute can be used when you think the distance between an image and text is too close.
Image-text interval: settings of the heat map ace and the vspace
1. horizontal interval: hspace.For example, (The unit is also calculated using
Force do not wrap
Div {White-space: nowrap;}
Automatic line feed
Div {Word-wrap: Break-word;Word-break: normal;}
Force an English word to break a line
Div {Word-break: Break-all;}
CSS settings do not change rows:
Overflow: hidden
Therefore, the structure is excellent
Code It can greatly optimize its maintainability. The following lists four methods to improve the maintainability of CSS files. This serves as a guide for Web Front-end development with a good CSS style
Generic
Overflow: hidden; automatically hides excess content to prevent opening layers and table ranges.
! Important
Apply priority of a style rule
Text color: # ff0000; text color font-family: "Arial", "Helvetica", "Sans-serif"; font-size: 9px;
Part 1: the purpose of building a css framework:
1. Achieve Standardization and frontend implementation that is adaptive to mainstream platforms;2. Quick Development. After the site style is determined, the front-end should not be the bottleneck
I. Partial style change
You can change the direct style, className, and cssText. Note that:
Note case sensitivity:
Javascript is case sensitive. className cannot write "N" as "n", and cssText cannot write "T" as "t". Otherwise, the effect cannot be
Http://5key.net/blog/article.asp? Id = 309
Exclusive CSS under IE:
Copy codeThe Code is as follows:
IE 6 ONLY:Copy codeThe Code is as follows:
IE 5 ONLY:Copy codeThe Code is as follows:
Internet Explorer 5.5 ONLY:Copy codeThe Code is as follows:
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