Style Sheets
  Home arrow Style Sheets arrow Customizing styles: User-Controlled Style ...
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Dedicated Servers  
Download TestComplete 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
STYLE SHEETS

Customizing styles: User-Controlled Style Sheets - Part II
By: Alejandro Gervasio
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 5 stars5 stars5 stars5 stars5 stars / 10
    2005-04-13

    Table of Contents:
  • Customizing styles: User-Controlled Style Sheets - Part II
  • Changing entire style sheets: the first basic approach
  • Listing full source code
  • Summary and further reading

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
     
    ADVERTISEMENT

    Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!

    Customizing styles: User-Controlled Style Sheets - Part II
    (Page 1 of 4 )

    In this second article of a three-part series, you will learn how to allow visitors to your website to view an entirely different, more visually accessible style sheet from the "default" one. Normally, providing more than one style sheet causes browser conflict issues -- but with a little bit of JavaScript, we will solve this problem.

    Introduction

    Welcome to Part II of the series "Customizing Styles: User-Controlled Style Sheets." If you read the first article, I really hope you had some fun playing with some of the techniques explained for changing styles in Web pages. Just in case you didn't have a chance to look at the first part, let's recapitulate the approaches I've demonstrated to perform simple and effective element's style manipulation.

    Digging into the area of fascinating Web style programming, I've exposed the most common approaches for style changes in Web documents: accessing specific elements by their ID attribute, and more widely, manipulating larger page sections in a generic way, changing styles according to a given tag.

    In the first case, the style change is a rather surgical process, where we need to affect only small document sections, and certainly intended to be used on a limited scale. The second method, which usually works on HTML collections generated from a targeted tag, such as a paragraph (p) element, is more flexible for giving users control over bigger portions of a Web page. From a designer's point of view, just using a simple script that manipulates programmatically multiple page elements at once, makes it a big time saver for style changes with a minimum of effort.

    I'm pretty sure that you're very anxious to know about more complex techniques for manipulating styles. I hope I'm right. Of course, if you're a well-seasoned developer, this certainly won't blow your mind, but it might be useful for filling in some gaps in the overall background. So, with that in mind, the next step leads us directly to the process of changing entire style sheets. That's definitely a big step forward.  reading.

    More Style Sheets Articles
    More By Alejandro Gervasio


       · Over this second article, the process to change styles in web documents is taken one...
       · I took the liberty and clean the example up and make it more...
       · Hi Chris,Definitively that was a good addition to the existing changeStyle()...
     

    STYLE SHEETS ARTICLES

    - Using PNG Images to Build Background Effects
    - CSS: Continuing the Clarification of CSS Cla...
    - CSS: Top Secret Classification
    - CSS: Dimensions
    - CSS: Margins and Padding
    - CSS: Crossing the Border
    - CSS: Text, Fonts, and Tables
    - CSS: Working with Text
    - CSS: Backgrounds
    - CSS for the Newbie
    - Styling Web Page Headers with Transparent Ba...
    - Creating Angled Corners with Transparent Bac...
    - Style Sheets for a Useful Links Page
    - Modifying the Look and Feel of Individual El...
    - Using Persistent Styles with Multiple Style ...


     
    Accelerating Trading Partner Performance
     
    Competing on Analytics
     
    Cost Effective Scaling with Virtualization and Coyote Point Systems
     
    Five Checkpoints to Implementing IP Telephony
     
    Hosted Email Security: Staying Ahead of New Threats
     





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 1 hosted by Hostway