2

I have been searching the web for a solution for 3 hours without success. I want to set overflow: auto to tag as follows:

td {
 overflow:auto!important;  
}

It works fine in chrome but not in Firefox. I checked my entire css file by w3c css validator. There is no error too. Any idea please? I am sorry if it is very silly question but everyone have to learn this first to be expert.

Abdus Sattar Bhuiyan
  • 3,016
  • 4
  • 38
  • 72

2 Answers2

2

Try wrapping it in a <div>. The overflow attribute is not defined for a <td> element.

See here

Try to put your overflow:auto to the wrapper like this,

pre, div {
    width:100%;
    overflow: auto !important;
}

See demo

Community
  • 1
  • 1
newTag
  • 2,149
  • 1
  • 22
  • 31
  • Hello five year old answer! This worked for me in 2019, just wondering if I have missed something or if this is still a relevant solution? Thanks for this – spences10 May 30 '19 at 06:12
1

Try this

  td {
      height: 20px; // mention a height
      overflow:auto!important;  
  }
Smruti
  • 452
  • 4
  • 6
  • send me ur design structure or css – Smruti Mar 19 '14 at 05:47
  • There are a lot of code(about 1000 line). All code is not my concern. only tag and its css in my code are my concern. Here is html of :
    and the css is : td { height: 20px !important; overflow:auto!important; }
    – Abdus Sattar Bhuiyan Mar 19 '14 at 05:52
  • Instead of add the **overflow:auto** in td, add this one in class of a div. It'll be helpful. – Smruti Mar 19 '14 at 06:09