yipyipdog Posted May 6, 2006 Share Posted May 6, 2006 i cant change the scrollbar attributes using any of the xhtml DTD (tried both the strict and the transistional)i can get the scrollbar to change if i omit the Doctype.i first used css to change the style of the scrollbar and this only worked if i left out the Doctype, but since i want to keep the Doctype so i can have a xhtml 1.0 valid document i then tried to do it a different waythen i used the DOM Html like this:<script type="text/javascript"><!--function Changescroll(){document.body.style.scrollbarFaceColor="#520007";document.body.style.scrollbarArrowColor="#000000";document.body.style.scrollbarTrackColor="#5F0008";document.body.style.scrollbarShadowColor="#380005";document.body.style.scrollbarHighlightColor="#B80010";document.body.style.scrollbarDarkshadowColor="#000000";document.body.style.scrollbar3dlightColor="#A6696E";}//--></script>but it also only worked if i omitted the Doctype - I have come to the conclusion that none of the XHTML DTD's support changing scrollbar attributescan anyone shed some more light on this pleasemy goal is to have an XHTML valid document that can have a different looking scrollbar from the default browser scrollbar Link to comment Share on other sites More sharing options...
johneva Posted May 7, 2006 Share Posted May 7, 2006 Changing the scrollbar colours using CSS only works in IE anyways and it is not valid CSS.I always advise against changing the scrollbar colours for these reasons. :)As for it not working even using DOM I would say yes it is something to do with the strictness of XHTML.I think W3Cs veiw on such things is the browser is not part of the website and it is not down to you how somebodys browser is styled.Though I maybe way off I am just guessing. Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 7, 2006 Share Posted May 7, 2006 (edited) My opinion is scrollbarred frames should be allowed to be colour changed :)Am I right? :)Only possible way to alter them is via direct CSS: <style>...</style> in the head section.Browsers other than IE won't use the statements though Edited May 7, 2006 by Dan The Prof Link to comment Share on other sites More sharing options...
johneva Posted May 7, 2006 Share Posted May 7, 2006 I carnt stand frames and dont use them anyways but that is another thing altogether. Link to comment Share on other sites More sharing options...
scott100 Posted May 7, 2006 Share Posted May 7, 2006 my goal is to have an XHTML valid document that can have a different looking scrollbar from the default browser scrollbar<{POST_SNAPBACK}> This page is valid xhtml and has different coloured scrollbars (IE only)I used your javascript so you can't have been far off!<?xml version="1.0" encoding="UTF-8"?><!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"> <!-- template of basic structure of an xhtml file --> <head> <title>Basic XHTML Document Structure</title><script type="text/javascript">function Changescroll(){document.body.style.scrollbarFaceColor="#520007";document.body.style.scrollbarArrowColor="#000000";document.body.style.scrollbarTrackColor="#5F0008";document.body.style.scrollbarShadowColor="#380005";document.body.style.scrollbarHighlightColor="#B80010";document.body.style.scrollbarDarkshadowColor="#000000";document.body.style.scrollbar3dlightColor="#A6696E";}</script> </head> <body onload="Changescroll()"> Hello World from an XHTML File. </body></html> This Page Is Valid XHTML 1.0 Transitional! Link to comment Share on other sites More sharing options...
yipyipdog Posted May 8, 2006 Author Share Posted May 8, 2006 This page is valid xhtml and has different coloured scrollbars (IE only)I used your javascript so you can't have been far off!<?xml version="1.0" encoding="UTF-8"?><!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"> <!-- template of basic structure of an xhtml file --> <head> <title>Basic XHTML Document Structure</title><script type="text/javascript">function Changescroll(){document.body.style.scrollbarFaceColor="#520007";document.body.style.scrollbarArrowColor="#000000";document.body.style.scrollbarTrackColor="#5F0008";document.body.style.scrollbarShadowColor="#380005";document.body.style.scrollbarHighlightColor="#B80010";document.body.style.scrollbarDarkshadowColor="#000000";document.body.style.scrollbar3dlightColor="#A6696E";}</script> </head> <body onload="Changescroll()"> Hello World from an XHTML File. </body></html> This Page Is Valid XHTML 1.0 Transitional! <{POST_SNAPBACK}> scott, this is interesting as it doesnt work unless the "<?xml version="1.0" encoding="UTF-8"?>" is addedmy document started out as:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><%response.Charset="utf-8"%><html xmlns="http://www.w3.org/1999/xhtml">any thoughts as to why? Link to comment Share on other sites More sharing options...
Jack McKalling Posted May 10, 2006 Share Posted May 10, 2006 yeah, but this: <%response.Charset="utf-8"%>Is ASP language Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now