CSS Table-cell automatically complements element issues

Source: Internet
Author: User

Recently looking at the demo on the IMOOC, however, today I have a very troublesome problem.

First on the source, the above is my, the following is the source code.


The code is almost the same, body and so I use a percentage but should not affect.

Using the absolute property to navigate to the next line (wondering why the following sex did not work) after the investigation was found to be. Regist-cell set to Display:table-cell; This is used in the source code in order to achieve the effect on it (the bottom button and the input box) but I use the same method but to the next line;

Say the property is deleted, the effect is back to normal (not clear why the source of this can, the mechanism is what)

The browser completion mechanism was found on the internet after the element setting Table-cell

Original article

To summarize briefly, Table->[table-row-group (Table-column-groun)] (here you can default)->table-row (Table-column) Table-cell is a combination of the use of (equivalent to HTML table,tr,td,col and other tags), the browser will automatically complement the complete, concrete method can see the original text, summed up is that the current element set up a table property, if the child element is not complete, fill the anonymous child elements, And the anonymous child element and other child elements become the corresponding contents in the table, and the parent element of the current element has no table-related properties in the same vein.

Then I change the Display:table-cell in. Regist-cell to Table-row, and the child element automatically becomes the cell in the table, which enables the effect of button alignment without running to the next line.

CSS Table-cell automatically complements element issues

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.