Go Back   vb.org Archive > vBulletin 3 Discussion > vB3 Programming Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 02-17-2004, 08:40 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default 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
Reply With Quote
  #2  
Old 02-17-2004, 08:49 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #3  
Old 02-17-2004, 09:07 AM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

And do remember, only IE users will see it.
Reply With Quote
  #4  
Old 02-17-2004, 10:44 AM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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 )
Reply With Quote
  #5  
Old 02-17-2004, 11:15 AM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Well ... yes
Although I wouldn't do this.
Reply With Quote
  #6  
Old 02-17-2004, 01:24 PM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #7  
Old 02-17-2004, 01:59 PM
Natch's Avatar
Natch Natch is offline
 
Join Date: Nov 2002
Location: Australia
Posts: 851
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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
Reply With Quote
  #8  
Old 02-18-2004, 01:05 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thanks anyway, it's nothing with changing color when it doesn't work T_T
Reply With Quote
  #9  
Old 02-18-2004, 01:39 PM
NTLDR's Avatar
NTLDR NTLDR is offline
Coder
 
Join Date: Apr 2002
Location: Bristol, UK
Posts: 3,644
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

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.
Reply With Quote
  #10  
Old 02-19-2004, 12:41 AM
deathemperor's Avatar
deathemperor deathemperor is offline
 
Join Date: Jul 2003
Location: HOL
Posts: 1,270
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

thank you NTLDR, it works !
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 02:26 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.04960 seconds
  • Memory Usage 2,252KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)bbcode_code
  • (1)bbcode_html
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (1)pagenav_pagelink
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.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/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.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
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete