dynamic-css

How would I style the text following a :checked radio button?

I've tried the following: :checked + * { font-weight: bold; } With the following html: <p><input type = "radio" name = "blah" />some text</p> How would I go about styling such text? Solution: Throw label tags around the text, and select with :selected + * It works in opera and ff3, so I'm good. ...

jQuery css() function changing 'a' property not 'a:hover' property

Hi, I'm having a bit of trouble with the jQuery css() function at the moment. It is changing the css value of the anchor element's border-top-color instead of just the anchor element's border-top-color when hovered. Below is my code. $("#header #headerlist li a:hover").css("border-top-color","rgb(225, 149, 79)"); Any ideas why it cha...

Dynamic URLs in CSS/JS

I'm splitting up one of my larger apps and introducing a 'cdn' url to house common objects like CSS, javascript, and images to avoid duplication. What I need to do, though, is have separate URLs for our dev environments, so I may have: http://cdn-dev.example.com http://cdn-qua.example.com http://cdn.example.com depending on what envir...

XAMPP Mod_Rewrite & dynamic CSS

I'm running Apache on my local computer (mac) with Mod_Rewite enabled and Allowoveride All set in XAMPP's httpd.conf file. These are my rules, snippet of httpd.conf file - RewriteEngine On RewriteRule ^/setup/css/userlayout.css /setup/css/userlayout.php Alias /ms "/Users/web/wwwroot/ms" <Directory "/Users/web/wwwroot/ms"> Option...

CSS rule for attribute + sibling in DOM

What I have is a form with one fieldset containing several other fieldsets. For each fieldset, the user can check a box next to the legend and expand that fieldset (in theory, at least). I was thinking it would be cool to try using pure CSS for the effect, but I'm getting hung up on how to write the rule based on the two elements positi...

Generating dynamic css using php and javascript

I want to generate tooltip based on a dynamically changing background image in css. This is my my_css.php file. <?php header('content-type: text/css'); $i = $_GET['index']; if($i == 0) $bg_image_path = "../bg_red.jpg"; elseif ($i == 1) $bg_image_path = "../bg_yellow.jpg"; elseif ($i == 2) ...

Adding @import statement in a dynamic stylesheet for IE7+

I have a problem with adding a dynamic style element with @import statements for IE. Try this: var string = '@import url(test.css)'; var style = document.createElement('style'); if (style.styleSheet) { // IE style.styleSheet.cssText = string; } else { var cssText = document.createTextNode(string); style.appendChild(cssText)...

How do I create dynamic CSS in Rails?

Hi, what is the best/most efficient way of creating dynamic CSS with Rails. I am developing an admin area on a site, where I would like a user to be able to customize the style of their profiles(Colour mostly), which will also be saved. Would you just embed ruby script in the css file? Would you need to change the file extension from c...

Dynamic css on a parent window in Internet Explorer

Hello, I like to add a dynamic css file to a Parent window. I build this code for it: function LoadJSCSSFile(filePath,fileType,parentBOO){ //- var fileRef; // Get the file reference //- //Set external JavaScript/CSS file switch(fileType){ case "js": fileRef = document.createElement('s...