remove - Ocultar html horizontal pero no vertical scrollbar
hide vertical scrollbar css (8)
Deshabilite la barra de desplazamiento horizontal completamente agregando este código.
body{
overflow-x: hidden;
overflow-y: scroll;
}
Tengo un área de texto html que es de ancho fijo, pero de altura variable. Me gustaría configurar desbordamiento: desplazarse y poder mostrar una barra de desplazamiento vertical, pero no una horizontal. No puedo usar el desbordamiento: automático debido a otras cosas específicas de mi situación.
Sé que no hay forma de usar CSS 2 para mostrar solo barras de desplazamiento verticales pero no horizontales. ¿Hay algo que pueda hacer con javascript para ocultar la barra de desplazamiento horizontal?
El uso de wrap=virtual
en sus cuadros de formulario HTML elimina la barra de desplazamiento horizontal en la parte inferior del cuadro:
<textarea name= "enquiry" rows="4" cols="30" wrap="virtual"></textarea>
Vea el ejemplo aquí: http://jsbin.com/opube3/2 (Probado en FF e IE)
Para mi:
.ui-jqgrid .ui-jqgrid-bdiv {
position: relative;
margin: 0;
padding: 0;
overflow-y: auto; <------
overflow-x: hidden; <-----
text-align: left;
}
Por supuesto quitar las flechas.
Puedes usar css así:
overflow-y: scroll;
overflow-x: hidden;
Usa CSS. Es más fácil y más rápido que javascript.
overflow-x: hidden;
overflow-y: scroll;
<div style="width:100px;height:100px;overflow-x:hidden;overflow-y:auto;background-color:#000000">
.combobox_selector ul {
padding: 0;
margin: 0;
list-style: none;
border:1px solid #CCC;
height: 200px;
overflow: auto;
overflow-x: hidden;
}
establece un tamaño de desplazamiento de 200 px, overflow-x
oculta cualquier barra de desplazamiento horizontal.
selector{
overflow-y: scroll;
overflow-x: hidden;
}
Ejemplo de trabajo con snippet y jsfiddle link https://jsfiddle.net/sx8u82xp/3/
.container{
height:100vh;
overflow-y:scroll;
overflow-x: hidden;
background:yellow;
}
<div class="container">
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ''Content here, content here'', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ''lorem ipsum'' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ''Content here, content here'', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ''lorem ipsum'' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ''Content here, content here'', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ''lorem ipsum'' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</p>
<p>
Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry''s standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.
Why do we use it?
It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. The point of using Lorem Ipsum is that it has a more-or-less normal distribution of letters, as opposed to using ''Content here, content here'', making it look like readable English. Many desktop publishing packages and web page editors now use Lorem Ipsum as their default model text, and a search for ''lorem ipsum'' will uncover many web sites still in their infancy. Various versions have evolved over the years, sometimes by accident, sometimes on purpose (injected humour and the like).
</p>
</div>