How to determine what CSS property style to set for Div

Source: Internet
Author: User

How do you determine what CSS property style to set for the div? How do I know which CSS styles to set for div?

Set what CSS style is not imagined but has a reference, generally in three cases to get the need to know what style to set.

The first type: No artwork, think layout by yourself

This does not have the artwork and no reference to the case of the Div CSS layout, according to their actual ideas to layout set CSS, such as the layout of the structure of the left and right, then set Float:left and Float:right to the left, and then think on the left to the right layout width, Then set the width style.

In this case, the layout of the page is slow, think of a little layout, it may be in the thought of the layout of success to achieve the ideal aesthetic effect, may constantly modify the CSS style parameters to achieve the details of adjustment, it is more time-consuming, but also can know what CSS style you want to layout.

The second kind: View the Others site page to layout

In this case, no artwork, but want to be the same as other people's web page layout (or part of the same), this time will be the reference site as the object, to observe or analyze the other site width, whether there is a border, background style and other styles, according to the analysis or obtained style layout css. Of course if you can know how to analyze the other side of the code (HTML and CSS), you can directly copy the corresponding code to use (in the DIVCSS5 class will also teach you how to quickly get someone else's website code).

The Third kind: have the art picture situation to carry on the CSS layout page Shijiazhuang flowers

There are art drawings are relative to the other two kinds of layout to determine the CSS style, all the need to set styles including style values can be analyzed and obtained from the artwork.

For example, set the font color, you can directly see the need to set the font color style, and through the software to obtain the corresponding color values of the artwork, you can layout the desired CSS font color.

How to determine what CSS property style to set for Div

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.