1

Here is my HTML and CSS: https://jsfiddle.net/Lyvnma7p/

On line 1-5 I am setting the color of the page to slategrey background. The problem is the next line:

main {
background: white;
}

What this should be doing is taking the main element in my HTML (line 23-48) and changing the middle of the page to white.

What I have tried is changing the CSS tag from main to the div container class element, also with no luck as well.

Temani Afif
  • 245,468
  • 26
  • 309
  • 415
Synik
  • 139
  • 1
  • 12
  • Answered here: https://stackoverflow.com/a/5369963/4378314 – Kalnode Feb 16 '19 at 01:09
  • 2
    Set overflow:hidden on main, because your children are all float: left and right; – Kalnode Feb 16 '19 at 01:10
  • Thanks for the link, I had no idea this was the same problem - This solves it. – Synik Feb 16 '19 at 01:33
  • Also see this [answer](https://stackoverflow.com/a/8554080/4378314). Going further, today you'd use flexbox to pull off that layout, instead of floats. `justify-content: space-between` would do the same thing and offer all the good flex stuff. – Kalnode Feb 16 '19 at 03:28

0 Answers0