Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 7 of 7
  1. #1
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I made a scroll bar, but the real one disappeared.

    You can view what I am talknig about on www.techgearfree.com

    I tried to make the middle section a scroll bar. It works. However, when the page fits on your monitor, the built-into-the-browser scroll bar disappears completely. When the page doesn't fit, the bar will reappear and function correctly.

    To make my scroll bar, in my template, I put this in my style section:

    #scroll
    {
    height:100%;
    overflow:auto;
    scrollbar-face-color:2B638C;
    scrollbar-3dlight-color:black;
    scrollbar-darkshadow-color:black;
    }

    Then later, in the area where I want the stuff in the scroll box, I put:

    <td height="300" width=100% align="center" bgcolor="#FFFFFF"><div id="scroll"> <FORM action="register.php" method="get">
    <p><font face="Arial, Helvetica, sans-serif"><br>
    <font color="#173147" size="5" face="Eurostile">Pick Your <strong>FREE</strong> Gift:</font></font></p>
    <table width="80%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">

    When I remove:

    #scroll
    {
    height:100%;
    overflow:auto;
    scrollbar-face-color:2B638C;
    scrollbar-3dlight-color:black;
    scrollbar-darkshadow-color:black;
    }

    The page has the scroll bar on the right, however, the scroll bar I want to make, obviously is not made when I remove the code.

    Any tips?

    Thanks

  • #2
    Senior Coder gsnedders's Avatar
    Join Date
    Jan 2004
    Posts
    2,340
    Thanks
    1
    Thanked 7 Times in 7 Posts
    CSS:
    Code:
    body {
    overflow: scroll;
    }

  • #3
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    In the past, I have had problems not knowing how to insert a css code. My page has a style area in it, and I tried to insert it like this:

    <style class="text/css">

    body {
    overflow: scroll;
    }

    But it did not fix it. If I have inserted it correctly, it might not be working because my page has 3 different files: header.tpl index.tpl and footer.tpl. I tried to put it in header.tpl

    Thanks


    EDIT: I looked at the code, and it looks like it says if it overflows, show the scroll bar. My page already does this. The problem is when the page is not overflown, it doesn't have the faded out scroll bar it usually should.

  • #4
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    I tried to make the middle section a scroll bar. It works. However, when the page fits on your monitor, the built-into-the-browser scroll bar disappears completely. When the page doesn't fit, the bar will reappear and function correctly.
    I am so confused. So, you're saying when there isn't enough content to overflow the page, the scroll bar doesn't appear? Isn't that supposed to happen?

    What exactly is your question? How to have a scroll bar in the middle section? How to have the colored scroll bar? How to keep a scroll bar in the body?

    EDIT: I looked at the code, and it looks like it says if it overflows, show the scroll bar. My page already does this. The problem is when the page is not overflown, it doesn't have the faded out scroll bar it usually should.
    Why would it have a scrollbar if there was nothing to scroll?

  • #5
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    My problem is when I use the small scroll bar in the middle of the page, the built in browser one on the right hand side of the page disappears. Well, on normal pages, the scroll bar is faded out.

    If the content fits on the page, then if you refresh the page a coupkle times, you see the bar show up, then disappear and the content is pushed alittle over to the right

    If I take the scroll bar I made off of the page, it will show the bar on the right.

  • #6
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Okay. Maybe I should clarify a few things... first, you didn't "make" a scrollbar. You've only assigned colors (IE only, btw) to the scrollbar if one happens to be there. Since you've declared "overflow: auto" to the div, a scrollbar will appear when there is more content than the div can fit.

    If you take the #scroll bit out, you're not taking away the scrollbar, you're actually just taking away the properties that contain all the info within that certain amount of space. So the content overflows and there will be a new scrollbar, one on the browser window, that lets you see everything.

    Unless you're doing something in Flash you don't have control over scrollbars-- at least not to the point where you can have one appear if there is no need for one. (as far as I know)

    This is about all I can make of your problem; other than than I'm not sure I understand exactly what the problem is. I know the scrollbars are disappearing/appearing at times, but what is the behavior you want out of them?

  • #7
    Regular Coder
    Join Date
    Jan 2005
    Posts
    148
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I fixed the problem. In index.php for the popup item descriptions, I had this in:

    <style>

    body
    {
    height: 100%;
    overflow: auto;
    }
    div.nav {
    position: absolute;
    top: x;
    left: y;
    }
    body>div.nav {
    position: fixed;
    }
    </style>

    I took it out, and the scroll bar is now there.



    Thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •