javascript - CSS negative margin difference when loading elements dynamically and straight through the server -
the position of element differs when loading straight server , dynamically through css.
i using same css class on both occasions different results.
the margin-bottom set -40px, location of element different when loading element through php , dynamically through jquery.
the css class:
.iconview .adlocation { background-color: rgba(0,0,0,0.3); overflow: hidden; white-space: nowrap; text-overflow: ellipsis; color: #fff; height: 18px; font-size: 13px; position: absolute; margin-top: -40px; width: 188px; } i inspected css of element via chrome dev tools & margin-top set 40px. can't post preview not enough reputation. sry.
as have defined element position absolute, can use top: -40px; instead of using margin-top: -40px;
Comments
Post a Comment