Jump to content

help with <style>


jibo

Recommended Posts

hi i got to codes to go in the head on my page this 1

<STYLE type="text/css">a:link  {	color : slategray;	text-decoration : none;}a:visited  {	color : #C1C4C6;	text-decoration : none;}a:active  {	color : #C1C4C6;	text-decoration : none;}a:hover  {	color :#666666;	text-decoration : none;}</style>

and this 1

<STYLE><!--body {SCROLLBAR-ARROW-COLOR: #000000;SCROLLBAR-BASE-COLOR: #666666;SCROLLBAR-FACE-COLOR: #696969;SCROLLBAR-HIGHLIGHT-COLOR: #A9A9A9;SCROLLBAR-SHADOW-COLOR: #778899;SCROLLBAR-3DLIGHT-COLOR: #778899;SCROLLBAR-TRACK-COLOR: #808080;SCROLLBAR-DARKSHADOW-COLOR: #778899;}--></STYLE>

i no that for the 2nd code it needs to be either <style="text/javscript or css> but not sure which so need help with this, but also i cant put the two codes in to the head as 1 cancels out the other.... so what do i need to do??????? pls help. thnks.

Link to comment
Share on other sites

It's all css :)

<head><STYLE type="text/css"><!--body {SCROLLBAR-ARROW-COLOR: #000000;SCROLLBAR-BASE-COLOR: #666666;SCROLLBAR-FACE-COLOR: #696969;SCROLLBAR-HIGHLIGHT-COLOR: #A9A9A9;SCROLLBAR-SHADOW-COLOR: #778899;SCROLLBAR-3DLIGHT-COLOR: #778899;SCROLLBAR-TRACK-COLOR: #808080;SCROLLBAR-DARKSHADOW-COLOR: #778899;}a:link  {	color : slategray;	text-decoration : none;}a:visited  {	color : #C1C4C6;	text-decoration : none;}a:active  {	color : #C1C4C6;	text-decoration : none;}a:hover  {	color :#666666;	text-decoration : none;}--></STYLE></head><body><a href="http://www.google.com">Google</a></body>

Link to comment
Share on other sites

Just to add to that, customised scroll bars will not work in FF, im not sure about the other browsers, but they do work in IE. It isn't a problem though I dont think because if they work they work and if they dont then they dont, I dont think that they mess anything up at all. Or do they?So my advie just leave them in, but dont expect them to always work, because they might not!

Link to comment
Share on other sites

  • 1 month later...

i havent replied to this in time bin wel busy..... anyway... i used that code i was given, it works on the pages within the iframe but not on the main page, you know the index.html... any1 no why and/or have a solution??? thnks

Link to comment
Share on other sites

  • 2 weeks later...

any chance of a link? Is that CSS (above) in only 1 of the HTML files? you may need to include it for all, If you are using frames.it would probably be best to have an external CSS file (with a .css extension) referenced in the head of each HTML file. css file: ( save file as styles.css )

body {SCROLLBAR-ARROW-COLOR: #000000;SCROLLBAR-BASE-COLOR: #666666;SCROLLBAR-FACE-COLOR: #696969;SCROLLBAR-HIGHLIGHT-COLOR: #A9A9A9;SCROLLBAR-SHADOW-COLOR: #778899;SCROLLBAR-3DLIGHT-COLOR: #778899;SCROLLBAR-TRACK-COLOR: #808080;SCROLLBAR-DARKSHADOW-COLOR: #778899;}a:link  {	color : slategray;	text-decoration : none;}a:visited  {	color : #C1C4C6;	text-decoration : none;}a:active  {	color : #C1C4C6;	text-decoration : none;}a:hover  {	color :#666666;	text-decoration : none;}

in the <head> of every HTML file:

<html><head><link href="styles.css" rel="stylesheet" type="text/css"></head><body>

Hope this helps

Link to comment
Share on other sites

You should post this in the CSS forum

Just to add to that, customised scroll bars will not work in FF, im not sure about the other browsers, but they do work in IE. It isn't a problem though I dont think because if they work they work and if they dont then they dont, I dont think that they mess anything up at all. Or do they?So my advie just leave them in, but dont expect them to always work, because they might not!
This could work In IE5, IE6, IE7, Mozila, Netscape, Opera . . . And all other popular/recent browsers
Link to comment
Share on other sites

any chance of a link? Is that CSS (above) in only 1 of the HTML files? you may need to include it for all, If you are using frames.it would probably be best to have an external CSS file (with a .css extension) referenced in the head of each HTML file. css file: ( save file as styles.css )
in the <head> of ev[code]ery HTML file:<html><head><link href="styles.css" rel="stylesheet" type="text/css"></head><body>

Hope this helps

wel ive used that what you said it works fine for every other page (ya no the 1s within the frame) but not on the index :-S the link is www.choonage.com
Link to comment
Share on other sites

ye they are, there all in the same 1 the scrollbar doesnt work regardless of whether i use

<html><head><link href="styles.css" rel="stylesheet" type="text/css"></head><body>

or

<STYLE type="text/css"><!--body {SCROLLBAR-ARROW-COLOR: #000000;SCROLLBAR-BASE-COLOR: #666666;SCROLLBAR-FACE-COLOR: #696969;SCROLLBAR-HIGHLIGHT-COLOR: #A9A9A9;SCROLLBAR-SHADOW-COLOR: #778899;SCROLLBAR-3DLIGHT-COLOR: #778899;SCROLLBAR-TRACK-COLOR: #808080;SCROLLBAR-DARKSHADOW-COLOR: #778899;}a:link  {	color : darkgray;	text-decoration : none;}a:visited  {	color : slategray;	text-decoration : none;}a:active  {	color : #C1C4C6;	text-decoration : none;}a:hover  {	color :#666666;	text-decoration : none;}--></STYLE>

Link to comment
Share on other sites

the link style works on all pages including the index page except the scrollbar, which doesnt work on the index but will work on all the other pages. so everything works perfectly on every page except the index which just has the standard scrollbar

Link to comment
Share on other sites

will it work if i do it using php? i jus started learnin php tonight so i dunno if its possibleso this is the style i want

<STYLE type="text/css"><!--body {SCROLLBAR-ARROW-COLOR: #000000;SCROLLBAR-BASE-COLOR: #666666;SCROLLBAR-FACE-COLOR: #696969;SCROLLBAR-HIGHLIGHT-COLOR: #A9A9A9;SCROLLBAR-SHADOW-COLOR: #778899;SCROLLBAR-3DLIGHT-COLOR: #778899;SCROLLBAR-TRACK-COLOR: #808080;SCROLLBAR-DARKSHADOW-COLOR: #778899;}a:link  {	color : darkgray;	text-decoration : none;}a:visited  {	color : slategray;	text-decoration : none;}a:active  {	color : #C1C4C6;	text-decoration : none;}a:hover  {	color :#666666;	text-decoration : none;}--></STYLE>

but instead of using that im using this

<link href="styles.css" rel="stylesheet" type="text/css">

i got this idea earlier, i was looking for a php script for a guestbook in the code for the gbook it had

<?phpinclude("config/config.php");echo "<head>";echo "<title>$title</title>";echo "<style type=text/css>";echo "<!--";echo "h1{font-size:$textsize1;color:$textcolor1;font-style:$textstyle1;font-weight:$textweight1;}";echo "h2{font-size:$textsize2;color:$textcolor2;font-style:$textstyle2;font-weight:$textweight2;}";echo "a:link{color:$textcolor1;}";echo "a:visited{color:$textcolor1;}";echo "a:active{color:$textcolor1;}";echo "//-->";echo "</style>";echo "</head>";?>

this was ok to changed part of the style that i wanted but again didnt do anything for the scrollbars... obviously, its easy enough to change this to the correct colours for the links in the config.php i would try my idea out first except for a few probs, 1. i dont know how to edit the php script to include the scrollbars and 2. i wouldnt know how to put the code into index.html, unless i type it in and change the file to index.php but i dunno if i should really do that.... can anyone please help.... thanks. oh btw i know this would be better off in the php section, but if i randomly put it in there ppl would be confused as they wouldnt have the rest of the posts :)

Link to comment
Share on other sites

im answerin my own questions here :) i did manage to get a php script for my style, the script is

<?phpecho "<head>\n";echo "\n";echo "<STYLE type=\"text/css\">\n";echo "<!--\n";echo "body {\n";echo "SCROLLBAR-ARROW-COLOR: #000000;\n";echo "SCROLLBAR-BASE-COLOR: #666666;\n";echo "SCROLLBAR-FACE-COLOR: #696969;\n";echo "SCROLLBAR-HIGHLIGHT-COLOR: #A9A9A9;\n";echo "SCROLLBAR-SHADOW-COLOR: #778899;\n";echo "SCROLLBAR-3DLIGHT-COLOR: #778899;\n";echo "SCROLLBAR-TRACK-COLOR: #808080;\n";echo "SCROLLBAR-DARKSHADOW-COLOR: #778899;\n";echo "}\n";echo "\n";echo "a:link  {\n";echo "	color : darkgray;\n";echo "	text-decoration : none;\n";echo "}\n";echo "\n";echo "a:visited  {\n";echo "	color : slategray;\n";echo "	text-decoration : none;\n";echo "}\n";echo "\n";echo "a:active  {\n";echo "	color : #C1C4C6;\n";echo "	text-decoration : none;\n";echo "}\n";echo "\n";echo "a:hover  {\n";echo "	color :#666666;\n";echo "	text-decoration : none;\n";echo "}\n";echo "\n";echo "-->\n";echo "</STYLE>\n";echo "\n";echo "\n";echo "</head>";?>

i used the

<link href="styles.css" rel="stylesheet" type="text/css">

but changed it slightly to

<link href="test.php" rel="stylesheet" type="text/css">

which worked as far as the coloured links are concerned but again did nothing for the scrollbars :) i think im just about to give up on this one... nothing seems to work, if anybody as any ideas/suggestions/fixes is all appreciated. link to site its concerning is www.choonage.com thnks

Link to comment
Share on other sites

I'll stay out of the rest, because I'm really lost, but...Why on earth do you need to "echo" all that HTML with PHP? You can just have your ordinary HTML and enclose PHP code in <?php and ?>. Either way, the result is the same and echo-ing plain HTML will only be bad for performance.

Link to comment
Share on other sites

i dont know lol i used an html to php converter and thats wot it gave me... to sum it up, all i want is a customized scroll bar but the code at the top worked on every page other than my homepage so i thought maybe it would work if i used php rather than css, but it doesnt but also im unsure on how to embed php into my pages, only way i can think is if i type the php into my script eg index.htm and save it as index.php, but im also im unsure if this is the correct way of doing it or if theres an alternative way, similar to the way u can embed css

<link href="styles.css" rel="stylesheet" type="text/css">

Link to comment
Share on other sites

the link has stopped working, the whole script has dissapear from my index.htm so i have no homepage lmao
every1 can jus ignore this topic now i sorted it, apparently my code for my homepage was corrupt and thats why it dissapeared so thats probs why the scrollbar wasnt working, since starting from scratch the custom scrollbars are now workin fine so thnks everyone for ya help :)
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...