1

I'm trying to add overflow to an HTML element, and of course it works in every browser but IE.

Here is my code:

<div class = "twitter">
  <div class="twitter_image">
    <div class="user"></div>
  </div>
  <div class="label">
    <div class="boarder_control">
      <div class= "tweet_container">
      </div>
    </div>
    <div class ="smfooter"></div> 
  </div>
</div>

css:

  .twitter {
    padding-bottom: 2px;
    background-color: green;
  }

  .smfooter {
    padding: 2px;
    height: 10px;
  }

  .label {
    height: 15px;
  }

  .tweet_container {
    overflow-y:auto;
  }

  .boarder_control{
    padding:5px;
  }

  .tweet {
    margin-top: 7px;
    margin-bottom: 7px;
  }

What are the best practices for using overflow with IE 8?

IE:

All other browsers on earth

All other browsers on earth:

IE

Thanks

JZ.
  • 21,147
  • 32
  • 115
  • 192

2 Answers2

2

http://www.w3schools.com/cssref/css3_pr_overflow-y.asp

Note: The overflow-y property does not work properly in IE8 and earlier.

You can resolve this by using overflow: scroll;

If there is a horizontal scroll bar then you may have to hide it with another div.

Try this thread...

Hide html horizontal but not vertical scrollbar

Community
  • 1
  • 1
Chris Cannon
  • 1,157
  • 5
  • 15
  • 36
0

try to also assign an height to .tweet_container e.g.

.tweet_container { height: 300px; overflow-y: auto; } 
Fabrizio Calderan
  • 120,726
  • 26
  • 164
  • 177