CSS – overflow: hidden; FTW!
Posted in css on June 29th, 2009 by CindyThe Problem: The outer container was not wrapping around some text. It was clear in my code that the text should be inside the area with the grey border.
The Solution: Use the style “overflow: hidden;”
.container {
border: 1px solid #cccccc;
border-top: none;
}
So then, I was like: SHAZAM! and used “overflow: hidden;” and here is the result:
.container {
border: 1px solid #cccccc;
border-top: none;
overflow: hidden;
}
Basically, whenever you have some type of content (image, text, div, anything!) that is outside of where it is supposed to be (like a container div), check that the code is correct. Check that there are proper opening/closing tags. If all else fails, try “overflow: hidden;” on the container div and it should do the trick!
乾杯!
Cheers!

