From: Adam M. <ad...@tu...> - 2002-10-09 16:45:29
|
I like the idea of layout loading the appropriate css file for you. You could name your files explorer.css, netscape.css, opera.css, etc. and based on a check in layout the style sheet cooresponding to your browser would be loaded. In this case you may need a default.css to load when a browser unknown to layout hits the page (e.g.: lynx). Just my 2 cents Adam > Howdy, > > I would like to hear some ideas on how to implement multiple style > sheets. Of course we would all love for our themes to work with all > browsers out of the box, it ain't swinging that direction. > > There is a pick_css.php function but it is lacking in functionality and > not really clean. So what would be the best course of action and > programming? > > Multiple style sheets chosen by Javascript browser investigation. > Multiple style sheets chosen by PHP investigation. > > Both of these will work BUT some of the browers won't use relative > pathing of background images. This is a problem when you ship your theme > because it requires the user to enter their web address into the style > sheet. Not a big deal since TextPad could do it, but a hassle > nonetheless. You cannot put {THEME_DIRECTORY} into the style.css because > you can't parse it before it is called by the header. You can't use > variables because then you have to change the style sheet into a php > file (<span class="smalltext"> which we don't want to do). So there is > another option. > > Have the layout module load the proper CSS and then echo it in the > theme. > > The ONLY reason I am not crazy about this is that it is not as clean. > But if this is done, the template processor could read the style sheet, > put in the directories, and return the result to be displayed in the > header. Some designer do this using the forementioned javascript right > in their theme. > > So I am interested in ideas. I want process to be clean and easy (if > possible). You should be able to untar a theme and be ready to go. > > Let me know what you think, > Matt > > > Matthew McNaney > Internet Systems Architect > Electronic Student Services > Email: ma...@tu... > URL: http://phpwebsite.appstate.edu > Phone: 828-262-6493 > ICQ: 141057403 > > > > > ------------------------------------------------------- > This sf.net email is sponsored by:ThinkGeek > Welcome to geek heaven. > http://thinkgeek.com/sf > _______________________________________________ > Phpwebsite-developers mailing list > Php...@li... > https://lists.sourceforge.net/lists/listinfo/phpwebsite-developers --------------------------------- Adam Morton Developer - Web Technology Group Appalachian State University http://phpwebsite.appstate.edu |