Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums CSS What's wrong with this??! Reply To: What's wrong with this??!

#195714
shaneisme
Participant

The .movie.last is outside the .box element which is containing the rest.

You should really clean up your HTML. The way it’s written out now it’s really easy to make a mistake like this because you have no way of knowing what element is containing what or is contained by what parent.

It’s great to use indentation to show what is a parent or not.

<div><div>
Stuff and things</div><span>Other things</span>
</div><div><h1>Hello</h1>
</div>

Vs.

<div>
  <div>
    Stuff and things
  </div>
  <span>
    Other things
  </span>
</div>

<div>
  <h1>
    Hello
  </h1>
</div>

Which is easier to see what is inside what?