CSS - Change Scrollbar Style For Object In Html
I have been trying various methods to change the color of the scrollbar of an object in my HTML page. However it remains at gray.
The HTML code is as follows: <OBJECT NAME="foo" CLASSID="qeroeure" STYLE="scrollbar-base-color:red" CODEBASE="blah" WIDTH="700" HEIGHT="500" BORDER="3">"Cannot load image control." </OBJECT> This does not change the scrollbar color to red. What do I do to change the scrollbar color Similar TutorialsHey all, i can't find out anywhere if i can use css to change the style of html menus and buttons...Id just like the menu to look a little different, ie different button and different colour background and text..etc any ideas or help would be appreciated thanks RF Well, it seems I have a bit of a specific CSS problem. I am building a game in PHP/HTML. I have set a scrollbar in the style so: Quote: margin-right: 9px; overflow-y:auto; overflow-x:hidden; Now I have one page where I want a scrollbar not to the right of the screen but in the first row of the two row table. In essence I want the right cell (with a menu) to stay where it is while the left cell (with text) scrolls. Problem is that I can't get this to work, seeing as the stylesheet overwrites the page code... Any advise/help would be greatly appreciated! Faith I have a menu bar made up of <a href> elements that have a hover style of:
PHP Code: #mainMenu a:hover { color:#000000; background-color: #66c74c; padding: 1px 4px 1px 4px; margin: 1px 1px 1px 1px; } This will provide a green colored rollover visual as the user moves their mouse over the menu bar. I just added some JS today that will highlight the clicked (selected) menu so there is visual feedback of the section the user is in. For some reason, after setting the background color of the <a href> and color attributes, the HOVER: no longer functions. Here is the code to do the hilite where I pass the ID of the <a href> menu selection in the variable "menu": PHP Code: //--- Simplify setup by creating an array of the menus and hilight ID's --- var menus = ["menu1","menu2","menu3","menu4","menu5", "menu6","menu7","menu8","menu9","menu10"]; function J_hiliteMenu(menu) { //--- first make sure all the menu are hidden and unhilited --- for(i=0; i < menus.length; i++) { if (menus[i] == menu) theIndex = i; // Hold on to the chosen index position var obj = document.getElementById(menus[i]); if (obj == null) continue; // if menu is not available skip it obj.style.color = "#ffffff"; obj.style.backgroundColor = "#234fd7"; } //--- hilite the menu we're interested in --- var obj = document.getElementById(menu); obj.style.color = "#000000"; obj.style.backgroundColor = "#f8f400"; } Prior to hiliting the menu I un-hilite all the menus (since we may be switching from another). I think this is where the problem is. Maybe I need to redefine the rollover "hover" attribute for all elements during the un-hilite loop? Does anyone know how to set a HOVER: attribute using JavaScript? Thanks! Hay everyone! Trying to change the scrollbar colour... The problem is that it changes the font size of the menu at the top and shifts some other stuff around, generally annoying stuff. BUT!, the scrollbar colour does change!! Any help would be great Here is the code from the begininng.... <STYLE type="text/css"> <!-- BODY { scrollbar-face-color: #000000; scrollbar-highlight-color: #333333; scrollbar-3dlight-color: #333333; scrollbar-darkshadow-color: #333333; scrollbar-shadow-color: #333333; scrollbar-arrow-color: #000000; scrollbar-track-color: #333333; } --> </STYLE> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <!-- DW6 --> <head> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <title>Untitled Document</title> <link rel="stylesheet" href="emx_nav_left.css" type="text/css"> <script type="text/javascript"> <!-- ....blah blah blah and the rest of the site! Cheers - i'm probably being really dumb! JonOSaX is there a way of doing something like: css Code: Original - css Code .test{ width:auto; } .test2{ margin-right: .test width; }
??? thanks in advance. On the title of my gallery one of the words has moved to the second row. There is obvious room before the text hits the search box so I'm hoping to have all the text on the same row. This is what I've found for the gallery title CSS: #gallerytitle { padding: 10px 10px 10px 20px; -moz-border-radius-topleft: 10px; -moz-border-radius-topright: 10px; background: #F8F8F8; height:30px; border-bottom: 1px solid #CCC; What would I change there (if that is indeed the part that needs to be changed) to get the desired effect? Here is the site where you can see the gallery title issue. EDIT: I guess I can't link to my site. Hmm. It's kind of hard to describe what my problem is. I appreciate any help i have a link which has some parenthesis within the anchor tags, now what i was wondering was whether i could change the style (colour to be exact) of the parenthesis without adding extra tags into the html. Thanks for any assisstance eg: Order By (DESC) to become Order By ( DESC ) Hey all, I am having a little trouble with some stylesheet/javascript. I am trying to change the style on mouse over of another element. I have a DL with one DT & and one DD. I would like to be able to change the style of the DD on mouse over the entire DL. I'd like to change the class 'background' to 'backgroundOver'. The code: Code: <dl> <dt> <p>Text</p> </dt> <dd class="background"> <p>Text</p> </dd> </dl> Any help with this would be much appreciated. Cheers in advance. Hi guys... Would u mind to see this site I'm working ... http://diario.coldfusion-vpm.com It is being done in Mambo (www.mamboserver.com) And i would like to know why it sees OK in Firefox but it sees bad in IE, specially left & middle colum, they see overlapped, very strange CSS file: http://diario.coldfusion-vpm.com/templates/maiputotal/css/template_css.css thanks a lot in advance Hi all, I need to link to a stylesheet and have it apply to the page instead of just opening the css. if thats a bit difficult to understand, lets say for example, for site accessibility, you would have links to 3 types of stylesheets to make the text bigger or smaller... how do you link to the css files without them actually opening the css file? thanks in advance Matty on my site i have a few drop down boxes, ive used css to change the textboxes and submit buttons, but is there a way to change the arrows/buttons on a drop down list? i have a main page with an iframe.. my iframe contain most of my data.. there are 4 types of css for the user to choose.. i have create 4 css.. 1.css, 2.css, 3.css and 4.css... when they user clicks on the first link, the iframe will load 1.css.. if the user clicks on the 2nd link, the iframe will load 2.css.. what shld i do to attain that? I have a header.inc file and a footer.inc file that is called to each new file that I create. The header.inc file holds all the javascripts as well as calls the css, etc. It also begins the body and the footer.inc file closes the body. In other words in each new file that I create I have a php statement calling the header, and at the bottom of the file another statement that calls the footer. So each new file is really only part of the body as the title and head are found in the header.inc file. What I would like to do is be able to change the background color of the body of a new file if I choose to do so. But obviously because each new file is only part of the body I cannot put a css style in the new file. Is there any way of writing a php statement that I can place in a new file that would allow me to change the background-color of let's say #faunabody for that particular page??. Hope this is clear...thanks alot I have an unordered list that I'm making into a navigation menu. It's all working except for the first item in the list. I don't think I've missed anything but let me post the code and get a 2nd opinion. Thanks in advance for the help: Code: @charset "utf-8"; /* CSS Document */ #wrapper { width: 700px; position: absolute; top: 50px; left: 150px; margin: 0px 0px 0px 100px; } body { background-image: url(images/bg1.png); background-repeat: repeat; margin:0 0 0 0; } #banner { height: 125px; width: auto; background-image:url(images/banner.jpg); background-repeat:no-repeat; } #content { width: 400px; position: static; background-color: #e8caa6; font-size: 18px; margin: 0px 318px 0px 0px; /* 318px right 125px for centered */ padding: 10px 5px 10px 5px; border-style:solid; border-color:#000; border-width:10px; } #movietable { margin: 0px 0px 0px 0px; padding: 0px 0px 0px 0px; } #footer { padding: 0px 0px 0px 0px; margin: 0px 50px 10px 50px; text-align: center; font-size: 14px; } #footer a { text-decoration: none; color:#333; font-weight:500; } #footer a:link { text-decoration:none; } #footer a:hover { text-decoration:none; background:#d9d3c6; } #footer a:visit { text-decoration:none; } #nav ul { list-style: none; width: 700px; position: relative; } #nav span { display:inline; } #nav { height: 40px; background-color: #8D5C22; } #nav li { float: left; margin: 0 0.15em; } #nav li a { height: 40px; line-height: 40px; float: left; width: 167px; display: block; /*border: 0.1em solid #dcdce9;*/ text-align: center; } a.home:link{ color: #FFF; text-decoration: none; font-size: 2.0em; font-weight: bold; } a.home:hover{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.home:active{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.home:visited{ color: #FFF; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.restaurants:link{ color: #FFF; text-decoration: none; font-size: 2.0em; font-weight: bold; } a.restaurants:hover{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.restaurants:active{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.restaurants:visited{ color: #FFF; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.servicearea:link{ color: #FFF; text-decoration: none; font-size: 2.0em; font-weight: bold; } a.servicearea:hover{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.servicearea:active{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.servicearea:visited{ color: #FFF; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.contact:link{ color: #FFF; text-decoration:none; font-size: 2.0em; font-weight: bold; } a.contact:hover{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.contact:active{ color: #FF0; font-size: 2.0em; font-weight: bold; text-decoration: none; } a.contact:visited{ color: #FFF; font-size: 2.0em; font-weight: bold; text-decoration: none; } Html Code: <body> <div id="wrapper"> <div id="banner"> <!-- blah --> </div> <div id="nav"> <ul id="navblock"> <li id="nav1"><a href="index.html" class="home"><span>Home</span></a></li> <li id="nav2"><a href="rest.html" class="restaurants"><span>Restaurants</span></a></li> <li id="nav3"><a href="area.html" class="servicearea"><span>Coverage</span></a></li> <li id="nav4"><a href="contact.html" class="contact"><span>Contact</span></a></li> </ul> </div><!-- End Nav --> You can check the site live here . Hi there, I have set up some scollbar colours for IE. I have some scrollable divs that are using the css, but the main scrollbar to the right of the browser does not have the css applied to it. This is my css: PHP Code: scrollbar-arrow-color: #ffffff; scrollbar-3dlight-color: #d4e5ab; scrollbar-darkshadow-color: #517107; scrollbar-face-color: #719e07; scrollbar-highlight-color: #add450; Any ideas why that is? Hi Apologies if this is in the wrong forum but it stradles CSS, HTML and PHP. Is it possible to use @media within a style tag in html like so: <div style="@media screen { background-image: url(<?php echo $imageurl; ?>); background-repeat: repeat-x; background-position: left bottom;}"></div> The reason I am not not using it in the stylesheet directly is because I echo out all my template images dynamically with php. It seemed to work initially but then stopped. Anyone done this before? Garrett Hi. First of all i am new to CSS styling . I am using asp.net and i have created an html table in wich i added some treeviews, labels and stuff. I aslo created a StyleSheet where i wanna add style to a specific label within the table. Maybe it's very simple but i don't know what else to do, i am trying to do that by ours. For instance, #Label1 { color:Orange; } it's not working, if has no effect. Label1 is the name of the label. I think i'm not refering correct the Label. Should i add a reference to the table too? i tried something but it were wrong I have a form that displays the filled in results in an email but using all html. This is difficult to read for the user. Can this be easily corrected? Maybe apply a style sheet or something? It looks like: Code: <html> <head> <title>Moonbounce Adventures Order Form</title> </head> <body> Name: name<br /> Company: <br /> Address: add<br /> City: town - State: de - Zip: 19809<br /> E-Mail Address: name@.net<br /> Daytime Phone: 666-666-666<br /> Fax: <br /> Date of Event: 06/04/2005<br /> I am just wondering if there is a way to simply extend a style rule from one previously defined. For instance, if I have this rule: Code: .textarea-box { color: #990000; background-color: #fff; width: 375px; height: 200px; border: #000 solid 1px; } ...if I want another text area rule to be the same except for one difference, the height should be 80px, do I have to write the rule out again with a new name, incorporating the new height, or is there some nifty way to just change the height in the new rule? Thanks for help with this. j9 Hi, I'm looking for some help with CSS, specifically "a:visitied". I want the hover over behaviour to remain the same on html links regardless of whether or not they're already in your history. Is there a way i can do this? Many Thanks. |