This time I will bring you the solution to the failure of the element margin-top in the div tag, and the solution to the failure of the element margin-top in the div tagNotes on the methodThere are Which ones, the following are practical cases, let’s take a look.
The question is very strange. The upper-level tag of the element is div, and the attributes such as width and height have been set. However, when the margin is used to adjust the element, it does not take effect. Classmates’ experience suggests that the problem is solved by setting the parent element attribute of the element to
overflow:hidden;
.
I believe you have mastered the methods after reading these cases. For more exciting information, please pay attention to other related articles on the php Chinese website!
Related reading:
How to use the meta viewport attribute of HTML
How to use base64 encoding for html images
What are the differences between standard HTML writing and code generated by Dreamweaver
How to use the hr horizontal line in HTML
How to convert textarea text into html that is carriage return and line feed
What are the methods to prohibit page caching
The above is the detailed content of Solution to the invalid margin-top element in the div tag. For more information, please follow other related articles on the PHP Chinese website!