dynamic-css

How do I add a div and pick it up later

I think this is specific to IE 6.0 but... In javascript I add a div to the dom...I assign an ID attribute. When I later try to pick up the Div by the ID all I get is null??? Any suggestions? Example: var newDiv = document.createElement("DIV"); newDiv.setAttribute("ID", "obj_1000"); document.appendChild(newDiv); alert("Added:" + newD...

CSS / JavaScript Navigation Menu on top of Flash in Firefox

My site has a drop-down menu built in CSS and JavaScript that drops down over a Flash animation. In IE (6&7) the drop-down menus drop over the Flash animation, however, in Firefox (2&3) the menus appear underneath the Flash animation. Is there any way to get this dynamic menu to flow OVER the Flash in Firefox? In IE 7 menu appears ove...

Reference app relative virtual paths in .css file

Assume I have an "images" folder directory under the root of my application. How can I, from within a .css file, reference an image in this directory using an ASP.NET app relative path. Example: When in development, the path of ~/Images/Test.gif might resolve to /MyApp/Images/Test.gif while, in production, it might resolve to /Image...

How to change CSS class of a HTML page element using ASP.NET?

I have several <li> elements with different id's on ASP.NET page: <li id="li1" class="class1"> <li id="li2" class="class1"> <li id="li3" class="class1"> and can change their class using JavaScript like this: li1.className="class2" But is there a way to change <li> element class using ASP.NET? It could be something like: WebControl...

Is there a way to reference an existing CSS style from another CSS style using CSS or javascript?

If I have a style defined .style1 { width: 140px; } can I reference it from a second style? .style2 { ref: .style1; } Or is there a way via javascript/jQuery? --- Edit To clarify the problem, I am trying to apply whatever style is defined for a #x and #c to .x and .c without altering the CSS as the CSS is going to have update...

Wait cursor over entire html page

Is it possible to set the cursor to 'wait' on the entire html page in a simple way? The idea is to show the user that something is going on while an ajax call is being completed. The code below shows a simplified version of what I tried and also demonstrate the problems I run into: if an element (#id1) has a cursor style set it will ig...

How do you dynamically load a CSS file into a Flex application?

I know that you can apply CSS in order to style objects in Flex using the StyleManager: http://livedocs.adobe.com/flex/3/html/help.html?content=styles_07.html You can also load compiled CSS files (SWFs) dynamically: http://livedocs.adobe.com/flex/3/html/help.html?content=styles_10.html However, I'm dynamically creating my CSS files...

Dynamic resizing / repositioning of divs for multi-column viewing

Setup I have a website that draws RSS feeds and displays them on the page. Currently, I use percentages on the divs that contain each feed, so that multiples can appear next to each other. However, I only have two next to each other, and if the window resizes, there can be some ugly empty space on the screen. Desire What I'd like to ...

Pulling in Dynamiclly Generated (not a static file) CSS in FF?

Is there any way of pulling in a CSS stylesheet into FireFox 2 or 3 that is not a static file? Bellow is the code we are using to pull in a stylesheet dynamically generated by a CGI script. <link rel="stylesheet" href="/cgi-bin/Xebra?ShowIt&s=LH4X6I2l4fSYwf4pky4k&shw=795430-0&path=customer/DEMO/demo1.css" type="text/css"> /cgi-bin...

Capturing Print Event via jQuery

I would like to be able to manipulate the DOM just before my page is sent to be printed. Internet Explorer has an event on the window object called "onbeforeprint" but this is proprietary and isn't supported by other browsers. Is it possible to do this via javascript (jQuery in particular, if possible)? Before you ask, I can't easily us...

apply CSS dynamically in asp.net 2.0

Hi All, I have a scrolling div with Three linkbuttons and three differents divs. I need to apply CSS to active linkbutton as soon as button is clicked.The codes used by me are: protected void btnNetwork_Click(object sender, EventArgs e) { this.btnForecast.CssClass = "li_1"; this.btnBlog.CssClass = "li_2"; t...

How can I convince Firefox to redraw CSS Pseudo-elements?

I'm having issues getting Firefox to update a webpage when its class is changed dynamically. I'm using an html "table" element. When the user clicks a cell in the table header, my script toggles the class back and forth between 'sorted_asc' and 'sorted_des.' I have pseudo element which adds an arrow glyph (pointing up or down) depending...

Using PHP variables in your CSS file in Symfony

I'd love to use PHP variables in my CSS files but I don't want to load up the whole Symfony stack for each file load. Any one have any best practices and/or plugins to manage their CSS files in Symfony? ...

ASP.net drop down dynamically styling and then remembering the styles on aborted submit

So, I've got an ASP drop down list (this is .net 2.0). I'm binding it with data. Basically, when the page loads and it's not a post back we'll fetch record data, bind all the drop downs, and set them to their appropriate values (strictly speaking we: initialize page with basic set of data from DB, bind drop downs from DB, fetch actual ...

CSS - Separation of Color and Position

I'm just wondering what others do in this respect: Do you try to keep positional CSS (layout) separate from color/flavor CSS (color, background-color, background-images, font-size and family) ? Use two stylesheets? Combine two stylesheets server-side? Abstraction layer for the CSS? or you don't even try? I know sometimes after workin...

Facebook like status div

I'm looking for a footer like facebook has but only use CSS to style it no js. As you can see here http://dl.getdropbox.com/u/5910/Jing/2009-02-03_1256.png it always stays at the bottom even if I scroll down. http://dl.getdropbox.com/u/5910/Jing/2009-02-03_1258.png ...

Is it possible to refresh a CSS sheet with an AJAX postback?

I have been learning how to create dynamic images and dynamic stylesheets using ASP.NET 3.5. My reasoning behind this is I have a web page that I want to change the header background image (set with css) automatically. Check below for my test script: <%@ Page Language="VB" AutoEventWireup="false" CodeFile="Default.aspx.vb" Inherits=...

Question about mouse over and use <ul> <li>

I want to create a drop down menu with submenu, but have problem for one thing, My button appear under the text of main menu. How can I bring it up? see the source: <!DOCTYPE HTML PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"&gt; <html xmlns="http://www.w3.org/1999/xhtml"&gt;&l...

css div overflow and dynamic horizontal size

I have a web page that shows lots of tabular data and each of these tables needs to be placed on one horizontal line. I have mocked up an example below: <html> <style> .outer{width:300px;height:300px;overflow: scroll;} .inner{white-space: nowrap;} .inline{float: left;} </style> <body> <div class="outer"> <div class="inner"> ...

Converting SharePoint Quick Launch Navigation into Fly Out Button Navigation

I am in the process of branding my SharePoint Site and would like to take the existing Quick Launch navigation and display it as buttons that fly out. I believe the best way to do this is by using CSS and I have found some information on how to create dynamic vertical lists, however, not sure how to incorporate the existing quick launch...