4 Replies - 244 Views - Last Post: 04 January 2019 - 12:21 PM

#1 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 118
  • Joined: 16-January 13

Scroll bars in body section

Posted 04 January 2019 - 08:09 AM

In ASPX page, I add CSS as below.

Both vertical and horizontal scroll bars display but grey out.

How to make scroll bars showing and working?

.mybody {
margin: 0;
background: url("images/backgroundjob.png");
background-size: 4000px 250px;
background-repeat: no-repeat;
overflow: scroll;
} 
<body class="mybody">

---some div, panel here

</body> 

Is This A Good Question/Topic? 0
  • +

Replies To: Scroll bars in body section

#2 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15261
  • View blog
  • Posts: 61,152
  • Joined: 12-June 08

Re: Scroll bars in body section

Posted 04 January 2019 - 08:14 AM

Is there actual content to scroll and see?
Was This Post Helpful? 0
  • +
  • -

#3 aspfun   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 118
  • Joined: 16-January 13

Re: Scroll bars in body section

Posted 04 January 2019 - 08:16 AM

Yes, there are a few divs and panels in which a few controls, such as text boxes, buttons, images

This post has been edited by aspfun: 04 January 2019 - 08:17 AM

Was This Post Helpful? 0
  • +
  • -

#4 modi123_1   User is online

  • Suitor #2
  • member icon



Reputation: 15261
  • View blog
  • Posts: 61,152
  • Joined: 12-June 08

Re: Scroll bars in body section

Posted 04 January 2019 - 08:30 AM

Odd. Dumping that into a temp html doc worked when throwing a bunch of do-nothing text and divs in there. The scrollbars activated when needed.

Example - make the .mybody height and width 4000px;.
Was This Post Helpful? 0
  • +
  • -

#5 Martyr2   User is offline

  • Programming Theoretician
  • member icon

Reputation: 5465
  • View blog
  • Posts: 14,418
  • Joined: 18-April 07

Re: Scroll bars in body section

Posted 04 January 2019 - 12:21 PM

If the content of the body does not expand past 100% then those bars will be shown but remain inactive. I am not quite sure why you have put scrollbars on the body when the body will show scrollbars automatically when the content of the page expands past 100%. For instance the page you are looking at right now has a vertical scrollbar because this thread is past the initial 100% viewport height. This is normal body behavior and you don't need to add the scrollbars unless you want them to show all the time (whether or not there is content to expand past the limit)
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1