Solution to the invalid margin-top element in the div tag

php中世界最好的语言
Release: 2018-02-07 09:25:50
Original
2925 people have browsed it

This time I will bring you the solution to the failure of the elementmargin-topin 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 theattributessuch 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;
Copy after login

.

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!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!