Precisely locate the location of each element on the webpage

Source: Internet
Author: User

 

You can use tables or layers to precisely locate each element in a webpage. Using tables is a common practice. The specific method is to create a table on the webpage. Note that the Border width of the table should be 0. Then, put each element in each table unit as required. Adjust the size of the table unit and the position of the table border. Then, the elements in the table Unit will move accordingly. In this way, you can precisely locate the positions of each element on the webpage. The advantage of using tables is that they are common. Almost all versions of browsers can support tables. Its disadvantage is that it is troublesome to use and requires careful adjustment, and the positioning is not very accurate. Layers can be placed on webpages at will, so we can use layers for precise positioning. The method is to insert a layer in the webpage and put the element you want to locate in the layer. Then we can put the layer in any position we want. In addition, you can use the ruler and grid for precise positioning. Because the layer is only supported in the latest browser, we can change the layer to a table to be compatible with the old browser. Select "modify"> Layout mode> convert a layer into a table (convert layers to table. Note that the layers cannot overlap at this time. You can select View> prevent layer overlaps before inserting the layer to avoid overlapping layers. In general, the converted page may have some changes, and we need to adjust them manually. At last, it should be noted that when converting tables and layers, it is best not to use layers and tables in a single page at the same time, which may make your page a mess.

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.