I want my browser scrollbar in desired color

Last post 11-21-2008 3:13 PM by rossisdead. 5 replies.

Sort Posts:

  • I want my browser scrollbar in desired color

    11-20-2008, 8:31 AM
    • Member
      79 point Member
    • Happies
    • Member since 09-26-2008, 7:30 AM
    • Posts 159

     Hi all,

       I want my browser scroll bar in desired color.I used the code below.

    <style type="text/css">
    BODY{
    scrollbar-face-color:#DFFFBF;
    scrollbar-shadow-color:green;
    }
    </style>

    i used this code in masterpagse.i wrote this code before </head>tag
    but it's giving error which is saying that these are not a valid CSS property names

    Can anybody pls help me.

    Cheers Happy.
  • Re: I want my browser scrollbar in desired color

    11-20-2008, 8:39 AM
    Answer
    • Contributor
      2,120 point Contributor
    • SATISD9X
    • Member since 04-17-2007, 2:14 PM
    • Mumbai, India
    • Posts 355

    You can very well achieve this using CSS

     Apply the following CSS to your BODY and then see

    <STYLE TYPE="text/css">

    BODY
    {
    scrollbar-3dlight-color:'';
    scrollbar-arrow-color:blue;
    scrollbar-darkshadow-Color:''; 
    scrollbar-face-color:grey;
    scrollbar-highlight-color:'';
    scrollbar-shadow-color:'';
    scrollbar-track-color:red;

    }
    </STYLE>

    Satish Chilkury
    MCTS .Net Framework 2.0 Web Applications


    ~ Please Mark as Answer if it solves your query ~
  • Re: I want my browser scrollbar in desired color

    11-20-2008, 8:43 AM
    Answer
    • Participant
      1,094 point Participant
    • ankit.sri
    • Member since 02-27-2008, 7:10 AM
    • Noida
    • Posts 234

     Use the following before the </HEAD>

    <style type="text/css">
    html
        {
            scrollbar-face-color:#DFFFBF;
            scrollbar-shadow-color:green;
        }
    </style>

     The Entire code would look like:

    <%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPages_MasterPage" %>

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">

        <title></title>
        <asp:ContentPlaceHolder id="head" runat="server">
        </asp:ContentPlaceHolder>
        <style type="text/css">
    html
        {
            scrollbar-face-color:#DFFFBF;
            scrollbar-shadow-color:green;
        }
    </style>
    </head>
    <body>
        <form id="form1" runat="server">
        <div>
            <asp:ContentPlaceHolder id="ContentPlaceHolder1" runat="server">
           
            </asp:ContentPlaceHolder>
        </div>
        </form>
    </body>
    </html>

    A fundamental rule in technology says whatever can be done will be done
  • Re: I want my browser scrollbar in desired color

    11-20-2008, 8:55 AM
    Answer
    • Participant
      1,044 point Participant
    • joseabie
    • Member since 04-07-2008, 4:56 AM
    • Abu Dhabi
    • Posts 291

    <STYLE type="text/css">
    <!--
    BODY {
    scrollbar-face-color: green;
    scrollbar-highlight-color: blue;
    scrollbar-3dlight-color: yellow;
    scrollbar-arrow-color: red;
    scrollbar-track-color: aqua;
    }
    </STYLE>

     

    use this code just under the <BODY> tag..

    its worked for me...

     

     

    please check

  • Re: I want my browser scrollbar in desired color

    11-20-2008, 9:07 AM
    Answer
    • Participant
      1,308 point Participant
    • sharpeffect
    • Member since 09-18-2008, 4:49 PM
    • Posts 219
    The CSS like this in head tag would work perfectly for IE but in firfox it will not work. 
    <style type="text/css">
    html
        {
            scrollbar-face-color:#DFFFBF;
            scrollbar-shadow-color:green;
        }
    
     Firefox does not support this, and it is unlikely to change as this is a deliberate design decision by the firefox development team. There is no workaround, unfortunately.
  • Re: I want my browser scrollbar in desired color

    11-21-2008, 3:13 PM
    Answer
    • Member
      149 point Member
    • rossisdead
    • Member since 11-21-2008, 2:43 PM
    • Posts 20

     As has been stated by everyone else, the style rules that have been posted will definitely work. The catch is that it will only work in Internet Explorer.

     The scrollbar CSS attributes are Microsoft's own proprietary attributes. They are not standards-compliant, which is why it shows up as an error.

Page 1 of 1 (6 items)