Page Layout Tutorial: CSS Page Layout Properties Introduction

Source: Internet
Author: User
Because it is a layout tutorial example, in the details of the layout did not spend more time fine decoration, but I think the template layout is good, understand the CSS can be downloaded to more detailed art will be a very good web page, the initial learning can be downloaded to modify the properties of the parameters so that more image grasp the characteristics of attributes, To achieve a deeper mastery of the CSS's purpose. Is CSS really hard to learn? In fact, because it is a layout tutorial example, in the details of the layout did not spend more time fine decoration, but I think the template layout is good, understand the CSS can be downloaded to more detailed art will be a very good page, The initial learning can be downloaded to modify the property parameters so as to better grasp the attributes of the property, in order to achieve a deeper grasp of the purpose of CSS.


Is CSS really difficult to learn? In fact, it is not difficult, but the lack of mastery of experience, holding a book Hard Ken, there is no harvest? Yes! But it may not work, as I have learned that passive learning is difficult to learn, and my experience in learning it is that I can master the essentials first (important attributes start), To master the essence of nature these attributes are far from enough to meet their own needs to arouse their desire for knowledge, automatically extend the other related attributes to naturally grasp and deepen the understanding of CSS. This is a way I think (unfortunately I learned when someone told me that I would go a lot less detours). First write experience and everyone share, language organization may be some lack, but also please include, but believe in more experience in the future, will write better. Here are some of the lessons I've summed up and some of the conceptual explanations I think need to be told. Have experience sharing welcome comments to discuss together.

In the current web technology, CSS+P has become a mainstream site standards, we can call him (Web Standard). CSS is an abbreviation for English cascading style Sheets (cascading style sheets), which is a computer language used to represent file styles such as HTML or XML.

Before understanding and learning CSS, we must first understand that this computer language has the advantage and convenience for us, understanding this I personally feel very basic but also very necessary, help clear css+p study purpose. Script Home Comprehensive website technology and design staff experience, and from the perspective of Web applications, the CSS+P website design advantages and problems are summarized as follows:

First of all, the great advantage of CSS in the concise code, for a large site, can save a lot of bandwidth (the real meaning is that the increase in effective keywords to account for the overall page of the weight of the Web site) using Web standards produced by the search engine friendly has a certain advantage, from the program and Web page art, The two can be combined with each other to reduce workload and avoid the burden of development.

Next is the Css+p production website makes the website revision relatively simple, many problems only need to change the CSS but does not need the change procedure, thus reduces the website revision the cost, saves a lot of time. In and the development room colleagues have cooperated with similar project case, believe colleague to this point more or less can feel the essence of convenient feeling.

The last point is that it feels very bad to control when it first comes into contact, and instead feels that the table has a better control of its orientation and is likely to contradict the sentiment of writing a page layout using p. In fact, this is a process of adaptation, we can through a lot of practical operation and practice and understand the main points attentively. Then you can feel that it is indeed ever-changing, a page of different layouts may have different implementation of the layout of the writing, but anyway, the code is a principle of walking: that is: the definition of the name as much as possible, that is, with the fewest code to define more box mold I call it (a multi-use); Naming should be normative, combinatorial, convenient for other designers to see the name of the solution. The other one is about using ID or class, and for this there are a lot of people who may be very vague. Actually is relative, but now I write the habit mainly uses the class more, I think this is more convenient and suits own writing custom.

The following are the topic.alibabacloud.com that need to first understand and master the basic commonly used attributes:

The important attributes that CSS must understand and master:

Margin:auto | Length value consisting of floating-point numbers and unit identifiers | Percentage. Percentages are based on the height of the parent object. For inline objects, the left and right outer yanbian distances can be negative values.

Padding:length length values consisting of floating-point numbers and unit identifiers | or percentages. Percentages are based on the width of the parent object.

Float:none | Left |right This is floating, in the definition of the layout must be used in the properties, in the use of it should pay attention to the resulting walk and browser compatibility issues, in a lot of practical operations to learn more about this property. This property is necessary to understand the following properties used by the "purge"

Clear:none | Left |right | Both None allows floating objects on both sides both no floating objects are allowed; left does not allow floating objects to the right.

Background:url (images/aardvark.gif) left top No-repeat | Repeat-x | Repeat-y defines the background image to beautify the layout is also a very popular property.

overflow:visible | Auto | Hidden | Scroll this role in the layout I usually use him to prevent, solve the problem of browser compatibility

BORDER:1PX Solid #CCCCC This is a property that defines the border size, line, and color.

List-style-image list-style-position List-stle-type This list property is typically used in both ordered and unordered lists, which are often used in defining page header index text connections. This is a typical representation of validating that CSS definitions are superior to tables.

The above is the script House think in learning CSS must be memorized and understand the CSS properties, fully understand the characteristics of its door can greatly improve the freedom of our application layout. So it is not difficult to learn this, master the above style you will find that previously did not understand the time to do the page to feel overwhelmed, after mastering it is natural according to their own logical thinking can be fully to achieve their own layout and layout, and CSS resistance will alleviate a lot.

Speaking of which, I would like to raise a very common question. I think the Web Standard is not to prohibit all the use of the table p, including myself at the beginning of the same mistake, "standard" my understanding is to standardize the designer to develop a good writing habits, to achieve a mainstream unity. In some cases, the table in the function of the implementation of the page will still be superior to p, and the uncontrolled P use excessive consumption of IE to increase the burden of CPU. This is also a problem that we should pay attention to.

Master the above commonly used properties, the following through the Reference Network blog by the design of a CSS three-column layout template, mainly around how to master CSS Essentials, learning page Layout Tutorial instance template, users can download the template according to the content of the article carefully pondering, so as to grasp the technology. The template is organized through this site to cover the important CSS properties listed above.

Because it is a layout tutorial example, in the details of the layout did not spend more time fine decoration, but I think the template layout is good, understand the CSS can be downloaded to more detailed art will be a very good web page, the initial learning can be downloaded to modify the properties of the parameters so that more image grasp the characteristics of attributes, To achieve a deeper mastery of the CSS's purpose.
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.