vb.org Archive

vb.org Archive (https://vborg.vbsupport.ru/index.php)
-   vB3 Programming Discussions (https://vborg.vbsupport.ru/forumdisplay.php?f=15)
-   -   how to have a colored scrollbar in vb3 ? (https://vborg.vbsupport.ru/showthread.php?t=61653)

deathemperor 02-17-2004 08:40 AM

how to have a colored scrollbar in vb3 ?
 
like the one of vb3 ACP, it's dark blue
how to make one for main forum ? I tried but didn't know how to get it correct.
thank you

Andreas 02-17-2004 08:49 AM

Not possible if you want compliant CSS, as there is no attribute for specifying scrollbar color.

If you don't care: Set scrollbar-base-color, scrollbar-3dlight-color, scrollbar-arrow-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color and scrollbar-track-color for the BODY-Tag.

Brad 02-17-2004 09:07 AM

And do remember, only IE users will see it.

Natch 02-17-2004 10:44 AM

Quote:

Originally Posted by KirbyDE
Not possible if you want compliant CSS, as there is no attribute for specifying scrollbar color.

If you don't care: Set scrollbar-base-color, scrollbar-3dlight-color, scrollbar-arrow-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color and scrollbar-track-color for the BODY-Tag.

You can still have compliant CSS :) :) Do it with Javascript :) ;)

NOTE: this is script I wrote by hand - feel free to use it but PLEASE leave the acknowledgement in ... it *should* retain colours that fit with your style automatically :) but of course will only render colours in IE
Code:

<script type="text/javascript">
<!--
/* START I.E. only Flat ScrollBar Colour Script for use with CSS2 Validation */
/* coded by Natch - mobileforces.org */
bg  = window.document.bgColor;
txt = window.document.fgColor;
if (document.all){
 with (window.document.body.style){
 scrollbarBaseColor=bg;
 scrollbarFaceColor=bg;
 scrollbarHighlightColor=txt;
 scrollbar3dLightColor=bg;
 scrollbarShadowColor=txt;
 scrollbarDarkShadowColor=bg;
 scrollbarArrowColor=txt;
 scrollbarTrackColor=txt;
 }
}
/* END I.E. only Flat ScrollBar Colour Script for use with CSS2 Validation */
//-->
</script>

(NB: your CSS won't be compliant, but doing it via Javascript will hide your non-compliant CSS from the validator :p)

Andreas 02-17-2004 11:15 AM

Well ... yes ;)
Although I wouldn't do this.

deathemperor 02-17-2004 01:24 PM

Quote:

Originally Posted by KirbyDE
Not possible if you want compliant CSS, as there is no attribute for specifying scrollbar color.

If you don't care: Set scrollbar-base-color, scrollbar-3dlight-color, scrollbar-arrow-color, scrollbar-darkshadow-color, scrollbar-face-color, scrollbar-highlight-color, scrollbar-shadow-color and scrollbar-track-color for the BODY-Tag.

I did this, the scrollbar of the textarea works but not the main window T_T
Natch, yours doesn't seem to work either. Sorry for my idiot question but how can I set up colors in your code ?
Of course I'm using IE.
thank you guys

Natch 02-17-2004 01:59 PM

Quote:

Originally Posted by deathemperor1st
I did this, the scrollbar of the textarea works but not the main window T_T
Natch, yours doesn't seem to work either. Sorry for my idiot question but how can I set up colors in your code ?
Of course I'm using IE.
thank you guys

Actually I've found this script to fail on IE6, so Don't use it for a live board ... (it used to work on IE5.x)

If you wanna set up colours in the code I posted, you replace the txt and bg entries on each line with '#******' where the *'s are your RRGGBB colour codes ... (but as I said it will give u javascript errors in IE6 so don't use it :)

deathemperor 02-18-2004 01:05 AM

thanks anyway, it's nothing with changing color when it doesn't work T_T

NTLDR 02-18-2004 01:39 PM

Just put:

HTML Code:

html {
    scrollbar-base-color: #E7E5E6;
    scrollbar-arrow-color: #334B71;
}

in the additional css box in the style manager, obviously putting in your own colours.

deathemperor 02-19-2004 12:41 AM

thank you NTLDR, it works !


All times are GMT. The time now is 08:49 AM.

Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.

X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.02022 seconds
  • Memory Usage 1,737KB
  • Queries Executed 10 (?)
More Information
Template Usage:
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)bbcode_code_printable
  • (1)bbcode_html_printable
  • (3)bbcode_quote_printable
  • (1)footer
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (6)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (1)post_thanks_navbar_search
  • (1)printthread
  • (10)printthreadbit
  • (1)spacer_close
  • (1)spacer_open 

Phrase Groups Available:
  • global
  • postbit
  • showthread
Included Files:
  • ./printthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/class_bbcode_alt.php
  • ./includes/class_bbcode.php
  • ./includes/functions_bigthree.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • printthread_start
  • pagenav_page
  • pagenav_complete
  • bbcode_fetch_tags
  • bbcode_create
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • printthread_post
  • printthread_complete