CSS Hide Horizontal Overflow


CSS has a overflow property, if you set overflow to auto, the horizontal and vertical overflow may both come out even there is only vertical overflow.

To hide horizontal overflow, you need to use a CSS hack, be aware that this is not valid CSS, but it works in IE6 and above, Firefox and many major browsers.

You can use the CSS below to set horizontal overflow as hidden:

div {
    overflow-x: hidden;
}

Share and Enjoy:
  • Print
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google Bookmarks
  • Technorati
  • Twitter
  • Yahoo! Bookmarks

  1. No comments yet.
(will not be published)