Do Not Display horizontal scroll bars

Source: Internet
Author: User

Because only the horizontal scroll bar is hidden, scrolling = "no" cannot be used, because this will even hide the vertical direction.
Framework includesCode
<IFRAME src = "dayanmei. PHP "; width = "710" Height = "100%" scrolling = "Auto" align = "right" frameborder = "0" id = "mainframe" name = "mainframe" style = "overflow: auto "> </iframe>
Let's talk about the severity of the problem:
It is normal in IE7, Firefox, opera, and safari. If there is no vertical scroll bar under IE6, there will be no horizontal scroll bar, but when there is a vertical scroll bar, the horizontal scroll bar appears.
After testing, the following code is invalid for hiding the horizontal scroll bar.
<Body style = "overflow-X: hidden">
<Body style = "overflow: hidden">
<Body style = "overflow-X: hidden; overflow-Y: scroll">
After testing, the following code does not meet my requirements (I cannot hide the vertical lines)
1. Set IFRAME scrolling = "no". The horizontal vertical scroll bars are hidden.
2. The application overflow: hidden is invalid.
3. Add scroll = "no" to the body label of the contained page.
In the end, the horizontal scroll bar is hidden by setting the width of the body, but the vertical scroll bar is not hidden.
<Body style = "margin: 0; padding: 0; width: 670px;">

* Today, I just found a solution to completely solve the problem of hiding the horizontal scroll bar. Simply add the following CSS code to the page and you will be OK:

Condition:
<! Doctype HTML public "-// W3C // dtd xhtml 1.0 transitional // en" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<HTML xmlns = "http://www.w3.org/1999/xhtml">

HTML {overflow-X: hidden; overflow-Y: auto ;}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.