This is a discussion on "[SOLVED] CSS changing page colour etc" within the Web Page Design section. This forum, and the thread "[SOLVED] CSS changing page colour etc are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
[SOLVED] CSS changing page colour etc
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Afternoon,
Please could someone point me in the right direction for the code that is used (similar) in yahoo to change the colours of the background etc. I know its something to do with linking to another CSS? All help will greatly appreciated. Cheers Dan |
|
|
|
||||
|
Re: CSS changing page colour etc
If you have a look at this article it should start you in the right direction.
If you have any more questions then let us know. Stew
__________________
WelshStew Lead Administrator tierney rides tboard - uk site | xtreme wales - extreme clothing If you think I've helped, click the "Thanks" webforumz - facebook | LinkedIn
Last Blog Entry: Web Standards Curriculum Launched (Jul 8th, 2008)
|
|
|||
|
Re: CSS changing page colour etc
This is simply accomplished with css:
If you want to change the background of a div, do this:
Cheers
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: CSS changing page colour etc
swagner
what i am after is buttons that you press and it selects another css. |
|
|||
|
Re: CSS changing page colour etc
|
|
|||
|
Re: CSS changing page colour etc
Ahh, I see. That requires JavaScript, though...
Try this tutorial
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: CSS changing page colour etc
Oh, you got to it before I did. Good luck!
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: CSS changing page colour etc
Until recently, I had about eight stylesheets on my site. I discovered that these were slowing down the initial page load, because each of them generated an http request.
Now, I only have two stylesheets: one for screen, one for print. All of the alternative styles are contained in the screen stylesheet. Instead of using JS to enable/disable stylesheets, I use it to change the class name of the <body> element. So my styles are like this:
The only disadvantage of this method is that it does not allow user agents to provide in-browser stylesheet selection (because all the styles are in one sheet). But this hardly matters, since it's unlikely that many users will dig around in their browser menus to switch styles (how would they even know the styles were available?). IE doesn't provide this option at all. |
|
|||
|
Re: CSS changing page colour etc
That's a good idea Mike! Changing the class instead of the stylesheet is much better, and faster...
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
|
|
|||
|
Re: CSS changing page colour etc
Note that you cannot simply use:
This is really useful in other situations too. I should note that, one day, style switching might become common user behaviour, with prominent, intuitive browser controls. If this ever happens, my method will become bad. But until then, I like my method better. |
|
|||
|
Re: CSS changing page colour etc
I have created my own customized Page Option almost like what Yahoo have with the help of some webforumz member!
Check out this Thread, I have included the zip file as well for you to try! Cheers..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
|
![]() |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Green bar of colour at bottom of page gets bigger the more page is extended | pixelgirl | Web Page Design | 1 | Apr 1st, 2008 01:27 |
| Changing the colour of the header | hunny | Web Page Design | 4 | Oct 5th, 2007 09:44 |
| [SOLVED] Changing pictures on same page | R8515198 | JavaScript Forum | 7 | Oct 3rd, 2007 00:14 |
| Help with changing colour of hyperlinks | sing2trees | Web Page Design | 10 | May 22nd, 2007 18:08 |
| changing the scroll bar colour | bruno89 | Web Page Design | 2 | Oct 6th, 2005 15:12 |