| Using php to dynamically generate conflict free css |
|
|
|
| Articles Reviews CSS | |
| Written by Thierry Schellenbach | |
| Monday, 29 October 2007 | |
|
This little blog has been getting a lot of coverage lately thanks to a write up by Ajaxian. Developing with Symfony is great and always gives you a lot to think and write about.
For my new product I was having a CSS conflict. This tends to happen when you include your own html and css into someone else’s website. For instance if you have a widget as such: html <div id="mywidget"> <h1>My hello world widget</h1> </div> css H1 { color:green; font-size:20px; } The solution to this problem is quite straightforward, you simply specify your css selector as div#mywidget H1. However, what if you want to allow people to customize the looks of your widget. Now you could off course ask them to include the div#mywidget part, but chances are this will give problems. Since I was already using the great sfCombineFilterPlugin an easy solution was available. (If you didn’t use the sfCombineFilterPlugin yet, go check it out immediately. Also have a look at Yahoo’s Yslow). Powered by jReviews |
|
| Last Updated ( Saturday, 20 September 2008 ) | |
| < Prev | Next > |
|---|







