Layout encountered problems very good insight _css/html

Source: Internet
Author: User
Objective
Not until the next generation of web development technology RIA technology matures, of course, but also to fight HTML. Some time ago, "website refactoring" was very hot,
These are progress, and indeed give us new ideas. Here to summarize some of the experience in the development of a bit.

Layout
1, the upper and lower left and right layout
Just started to study the production of the page, with a mm DW software, visualization, so that more people learn web production.
Still remember to do the page used or DW, a friend asked me the same sentence: "Do Web Forms more or more layers, what is the difference?".
I told him. In fact, DW uses layout-layout tables, quickly draw the entire page frame, and then step by step refinement. Do the page is very fast things, the proposal to use a table, the layer is not good control position.
It's a bit misleading to think about it now. Ah, but maybe, progress needs a process.

"Website refactoring" Spring Breeze, with the layer of page layout does give us the development of new ideas.
Advantages:
The page is clearer and the code volume is reduced;
CSS is more widely used.

Top and bottom row, layered clear, code demo:










Left and right row, can be used absolute positioning
#head {
Position:absolute
top;10px;
left:200px;
}




2, the div in the minimum nesting div, available



3, the separation between the control layer with padding





4, using border to make the separation between the structure of the line



5, the use of CSS can be used less pictures

Page Layout demo (can see the source code, more clear than the previous table layout):
Http://davidblog.blogdriver.com/davidblog/inc/demo_div.jpg

Form
1. Form's margin and padding
When I used to insert a form in a page, I always felt that margin,padding default to 0, sometimes affecting the layout of the page.
You can use CSS to set it to add 0
form{
margin:0 0 0 0px;
padding:0 0 0 0px;
}
You can also define the same p mark or other mark.

2. Select
Application of Optgroup

3. Add a label to the checkbox or radio
Today

4. Button
The previous item uses a button for the picture. Gradually found defects in the application.
Suggest or use CSS to beautify.
In fact, CSS can achieve a more beautiful button


Table
The table should still be used for table. Table always has his winning side.
For example, some data shows a grid or structure that is more uniform, branch-broken layout.
Table Related Tips




Application of CSS expressions
Using CSS to reduce code writing
1. Table Mouse Events


2.
Width:expression{document.body.clientwidth<800? "760": "1003"}



Noteworthy marks


  • Menu 1

  • Menu 2








      • Health information:
        Height
        Weight

        Superscript
    Related Article

    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.