0

hello can someone explain me why does the second paragraph included in some non-existent block?

enter image description here

first p is ok

enter image description here

and especially i do not understand what kind of block 236x92(1 screenshot)? nums and names are not related enter image description here enter image description here

css:

.names {
    margin-top: 5px;
    float: left;
    width: 80px;
    margin-left: 5px;
    margin-right: 5px;
}

.nums {
    margin-top: 5px;
    float: left;
    width: 161px;
}

p {
    color: white;
    text-align: center;
    margin: 10px;
    font-size: 15px;
}
klast
  • 39
  • 3
  • Please make a StackSnippet of your problem along with the minimum code required to reproduce the problem. – Wais Kamal Feb 15 '21 at 09:32
  • you need to clear float, add clear:left to `p` – Temani Afif Feb 15 '21 at 09:35
  • @TemaniAfif sorry i have another question, now margin only works for the first p. and the second is there, but it overlaps the previous divs, why? https://imgur.com/a/972Sq1V – klast Feb 15 '21 at 09:53
  • this is due to float, you need to apply a bottom margin to float instead of a top margin to p. Related: https://stackoverflow.com/q/59559477/8620333 – Temani Afif Feb 15 '21 at 10:01

0 Answers0