No matter who you are, you will encounter one or more problems in the page creation process. If something goes wrong, you must solve it. The premise for solving the problem is to know where the problem is. For a newbie, you may not know where the
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
Even worse, even if you only design for IE and do not consider other browsers, the IE model is definitely a monster that is hard to comprehend, therefore, you may encounter many difficulties when designing for IE, and find that many effects are
Vertical center using line-height
Line-Height: 24px;Use line-height (the height is the same as that of the parent-layer container) when a fixed-width container is used and a line of vertical residence is required. For more vertical center
Before introducing the implementation of ensure, let's take a look at its functions:
Ensure ({HTML: "popup.html ",Javascript: "Popup. js ",CSS: "popup.css"}, Function (){Popup. Show ("Hello World ");});In this sectionCodeIn the middle,
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
Use JavaScript expressions in CSS expressions. The CSS attribute is set based on the calculation result of the Javascript expression.
CSS expressions do not work in other browsers, so they are useful when setting ieseparately in cross-browser
To write this effect, you can familiarize yourself with the following:
1. Absolute positioning in relative positioning;
2. CSS for the browser hack;
3. Understand several borders and the changes that can be implemented; and the calculation method of
Shield ie browsers (that is, they are not displayed under IE)
CopyCode The Code is as follows: *: Lang (zh) Select {Font: 12px! Important;}/* FF visible. Note: Due to the latest update of opera, this sentence has now become a dedicated hack for FF *
1. There are many compatibility issues because different labels have different default padding margin values in different browsers. So we can define it in advance.
CopyCode The Code is as follows: * {padding: 0; margin: 0 ;}
OrCopy codeThe Code is
Align the two ends of the text:
CopyCode The Code is as follows: Text-align: justify;
Text-justify: Inter-ideograph;
Clear floating:Copy codeThe Code is as follows:. Clear {clear: Both; line-Height: 0; Height: 0; font-size: 0 ;}
Clear floating
Old topic: separation of an ancient poem
1. Give you an ancient poem and save it as a pile of unformatted text. You can understand its content and process the structure. After using the word layout, he has a structure2. This structure actually
ArticleDirectory
The above
The following
First, let's talk about several problems found during the attempt.
1. Box Model Problems
I believe that friends who play with refactoring or Div + CSS should know this thing. If you don't
I. Use less remedies.
Similar to break-word, Z-index, manual layering, vertical alignment, and so on, it is best to use less, because not all browsers support it and it is very difficult to pass W3C detection.
2. The center is not a float value.
I thought this was done by the backend alone. Today, we can see that this effect is actually implemented by CSS. Put it here to share with you
Special Recommendations 1. Add the script code to the favorites site, and use
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;
What do you think of when you see the HTML Tag? A text box? A button? A single queue? A check box ?...... Yes, yes, yes, they are all right. Maybe you may not think of it. This small input can actually create 10 different things. Below is a list to
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
Use less classes as much as possible, because they can be identified in layers, such as. News h3 without adding classes to h3.
3. Use div without distinguishing existing elements
Home
About Us
You can change it
Home
About Us
4.
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