PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Thursday, December 30, 2021

[FIXED] Why there is no scroll bar in any browser?

 December 30, 2021     css, html, yii     No comments   

Issue

My own page doesn't have a scroll bar, no matter what I do, minimize or zoom in/out. It just doesn't appear, I've tried FF, Chrome and IE: all no. Other internet pages are fine. Here is the body element and css:

<body>
<div class="container" id="page">

The CSS is like:

html, body
{
    margin: 0;
    padding: 0;
    color: #555;
    font: normal 10pt Arial,Helvetica,sans-serif;
    background: #EFEFEF;
    overflow: scroll;
}

#page
{
    margin-top: 5px;
    margin-bottom: 5px;
    background: white;
    border: 1px solid #C9E0ED;
}

PS: I'm using YII framework.

UPDATE:

IT seems YII has some default css settings, in screen.css the div container is mentioned three times as follows:

 .container {width:1250px;margin:0 auto;}
 .container:after 
 {content:"\0020";display:block;height:0;clear:both;visibility:hidden;overflow:hidden;}

.container {display:block;}

I changed overflow:hidden to overflow:scrollbut still didn't work.


Solution

In order to see a scroll you'll have to define a height and or width in which creates a scroll. Not being able to see if you have content or what your mark-up is like -- declaring at the HTML or body tag will do the trick.

html, body
{
    margin: 0;
    padding: 0;
    color: #555;
    font: normal 10pt Arial,Helvetica,sans-serif;
    background: #EFEFEF;
    overflow: scroll;
    height: 1000px; // toggle
    width: 100% // toggle

}


Answered By - fred randall
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing