-2

i'm trying to put a horizontal scroll in my page or in a specific .

I have a normal page in primefaces, and i need to put the in a horizontal way, how can i put the scroll in this specific div that contain the forms ?

edit1 :

<div class="col-md-1" style="overflow-x:scroll; width:2000px">
  <div class="row">
    <p:fieldset>
      <campo:simples label="Data Referencia" />
      <div class="col-md-2">
        <div class="row">
          <campo:radio enumClass="TipoTituloEnum" label="Situação" tamanho="1" tamanhoTotal="1" columns="1" layout="grid">
          </campo:radio>
        </div>
      </div>
    </p:fieldset>
  </div>
</div>

I try this ^^ but the scroll didn't appear Edit2: The scroll appear, but disabled

Look ^^ the component overflow the screen but the scroll didn't appear

Kukeltje
  • 12,085
  • 4
  • 21
  • 46

1 Answers1

2

Using overflow-x:auto will do the trick

.col-md-1{
   overflow-x:scroll;
}
//If you don't want disabled scroll bar 
.col-md-1{
   overflow-x:auto;
}
Skyyy
  • 1,457
  • 1
  • 22
  • 56
  • 1
    And if you don't want a disabled scrollbar to show up when the content is not wide enough, go with `overflow-x:auto;` instead. – modu May 31 '16 at 16:44
  • The scroll appear, but disabled – Leonel Tasso Guimaraes May 31 '16 at 16:49
  • as @modu said if you don't want scroll to be visible as disabled use `overflow-x:auto` this will show scroll only when content of the div will go outside (overflow) the div. – Skyyy May 31 '16 at 16:51
  • Many duplicates... https://www.google.com/search?q=stackoverflow+html+css+scroll. Finding one and marking this as one is appreciated... – Kukeltje May 31 '16 at 17:22