In your case, your has float:left, if you just strip it or put display:inline-block the BG color will appear, will gain the height of your that is display:block. block elements where overflow has a value other than > visible.floats (elements where float is not none).Here is the Mozilla documentation that covers the subject: linkĪ block formatting context is created by at least one of the ![]() Here you can read about it: linkĮven the overflow technique is used to correct parent height problems when Sons have some float set and parent has no height. The explanation is that overflow changes the context of the element. ![]() As the said just put a height already solves, but this does not explain why with Overflow works and without.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |