css

ASP.NET MVC Html.ActionLink CSS Background Image

Hi, I have been trying to set an image on an HTML.ActionLink by adding a CSS class for a link (a) and using the background-image to display the link as an image. This works great in all browsers but IE 6 and IE7. I need to get it working in these browsers, but can not figure it out. Any ideas??? a.edit { background-image: url("...

IE z-index relative/absolute bug in list

I have the following navigation where .topNav has position:relative and subnav has position:absolute. I cant get the sublist to appear over the main list due to z-index problems. This seems to be a known problem. <ul> <li class="topNav">About Us <ul class="subNav"><li> Subsection A</li><li>Subsection B</li></ul> </li> </ul> Does anyon...

Changing media specific CSS properties from Javascript

I have a CSS property (font) that I need to be able to change from Javascript (a pulldown). However, this font should only be used when printing (@media print). So, the javascript can't just change the value of the font, because that will effect the screen view as well. Is there a way to change ONLY the print version of the font proper...

Preventing the duplication of CSS files ?

hi, i got a user control which implements a reference to a css file, now i want to use this user control many times on page, and this will lead to duplication of inclusion of the css file. with java scripts it is simple by using the scriptmanager. so what is your suggestion for a solution or similar approach to the scriptmanager? ...

Problem with IE6 css

I have a problem with IE6 and jquery slider. Please click on the following link than click on the button "dodaj u košaricu" on the right bottom side. After that click on the "košarica" tab and try to move slider up and down. Some of the elements stay like they have position fixed. link text In IE6 all of the elements except table and t...

What would be the best way to make this layout (css or tables) ?

Hi, I am developping an application where there are subscriptions available. I wanted to know what would be the best way to structure data like the following schema (using tables or css). (Sorry, I am at work and cold not post the picture of what I want on a free image hosting service.) |¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯¯...

CSS Multi-Column Forms in HTML/ASP.NET

I've researched for hours and still haven't found a robust, non-absolute-positioning solution for displaying multiple-column forms and values without using TABLE tags. Can someone point me to a resource specifically oriented towards reproducing table-based, multiple-column forms (like name and address forms) in CSS to standards? Most o...

How to increase the page height by X pixels by using only javascript

Assume an HTML page: <html> <body> .. html content (outside of our control) .. .. javascript block .. .. some more html content (outside of our control) .. </body> </html> Assume further that the only part of the HTML page that we're able to control is a javascript block in the middle of the page. Using that javasc...

Why is this jQuery code not working to alter background-color in Firefox?

Hi, I'm trying to get the hang of jQuery and I had this simple bit of code that refuses to work. Anyone got an idea of why this might not be working? <html> <head> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript"> $(document).ready(function(){ $("div").live("click", divclicked); ...

is there a way to exclude a tag from css class

I have css that works on all tr tags for the table. so in my html I have no styling for tr tag. However, for one TR tag in my table I do not want to apply the TR that is generic to all tables. Is there a way to exclude this TR? .statisticsTable { border:2px solid #990000; width:100%; } .statisticsTable tr { font-weight : ...

CSS Background Image Load Behavior

Say there is a css style declaration to an element which has been set display:none (not displayed on screen) and it also has a background image set. Lets say this element is displayed on an event such as a mouse click. Would the browser load these images even before the element is displayed? Is this load behaviour consistent across bro...

Why can't you group descendants in a CSS selector?

If you want to assign the same style to a group of descendants, why isn't there an easy way to do this with CSS? Say you have an HTML table as follows: <table id='myTable'> <tr> <th></th> <th></th> <th></th> </tr> . . . <tr> <td></td> <td></td> <td></td> </tr> </table> Why do you have to style al...

Including loads of css files and Javascript file - how do I optimize

Duplicate: Multiple javascript/css files: best practices? Hi guys, my application is almost done but the thing is that I've noticed that I'm including a lot of external javascript files and css. I'm using a lot of third party free plugins here and didnt want to touch the code for fear of messing something up. But the result is that I n...

Truncating long strings with CSS: feasible yet?

Is there any good way of truncating text with plain HTML and CSS, so that dynamic content can fit in a fixed-width-and-height layout? I've been truncating server-side by logical width (i.e. a blindly-guessed number of characters), but since a 'w' is wider than an 'i' this tends to be suboptimal, and also requires me to re-guess (and kee...

Use JQuery UI Datepicker with Icons from Jquery UI Theme

I have a datepicker control setup using the JQuery UI, I am also using the JQuery UI themes which provide a bunch of default icons that I want to use. The DatePicker allows for specifying a specific image, i.e.: <script type="text/javascript"> $(document).ready(function() { $("#DateFrom").datepicker({ showOn: 'button', buttonImag...

How do I keep multiple DIVs the same height using jQuery?

I've got a few DIV tags with different amounts of text content. HTML: <div id="boxes"> <div id="boxone"> <p>...</p> </div> <div id="boxtwo"> <p>...</p> </div> <div id="boxthree"> <p>...</p> </div> <div id="boxfour"> <p>...</p> </div> </div> They're in a two-by-two layout...

Eliminating redundant code in a jQuery script

I've set up a page to load data via AJAX, utilizing the jQuery .load function. Upon loading each new file by clicking a link on a tab bar, I'm using jQuery to set the selected tab's color to yellow. I tried using a .toggleClass function to set the class of a li element to active, so that it would be yellow, but no dice, so I've resorted...

How do I remove the height style from a DIV using jQuery?

By default, a DIV's height is determined by its contents. But, I override that and explicitly set a height with jQuery: $('div#someDiv').height(someNumberOfPixels); How can I reverse that? I want to remove the height style and to make it go back to it's automatic/natural height? ...

Why isn't this div floating properly?

I have two listboxes and two buttons. Each listbox is in its own div and the two buttons are in their own div. One listbox should be on the left and the two buttons should be to the right of that with the other listbox to the right of the buttons. This is the markup I am using, but it is putting the 2nd listbox below the Remove butto...

How to remove existing class name and add a new one with jQuery and Cookies?

How can you remove a class name and replace it with a new one. <style> .red {background-color: #FF0000;} .green{background-color: #00FF00;} .blue {background-color: #0000FF;} </style> <body class="red"> <ul> <li><a href="">red</a></li> <li><a href="">green</a></li> <li><a href="">blue</a></li> </ul> </body> In this case when you click...