css

remove unused css selectors other than 'Dust Me Selectors'?

I would like to remove all unused css selectors from a common css file. While the Firefox extension "Dust Me Selectors" works well, it only works per page. It reports unused selectors for a page but some could be used on other pages. Is there a tool which can go through a folder, scan all the files and bring up a list of selectors which...

add a class to the li element or the a?

I have a standard list of links: <li><a href="">one</a></li> <li><a href="">two</a></li> If I want to add an extra class to one of the list items, should I add the class to the li or the a element? What is best practice? Many thanks! Cameron ...

JQuery - How to add a class to every last list item?

Howdy Guys, Got some code here that isn't working: $("#sidebar ul li:last").each(function(){ $(this).addClass("last"); }); Basically I have 3 lists and want to add a class (last) to each item appearing last in each unordered list. <ul> <li>Item 1</li> <li>Item 2</li> <li class="last">Item 3</li> </ul> Hope ...

How can I use "float: left" in a div without breaking the containing element's height?

It seems that floated HTML elements don't expand the heights of their containers. For example, consider the following code: <div class="portfoliosite" style="background: #777777; padding: 10px; width: 550px;"> <div class="portfoliothumbnail" style="background: red; margin: 0 10px 10px 0; float: left; height: 150px; width: 150px;"><!...

HTML unordered list sucks in IE7

I've created a HTML ordered list which looks fine in FF, but pretty awful in IE. My specific problems with the way IE displays the list are: List markers are missing Vertical spacing between list items is very uneven It seems the superscripts are the cause of (2), but I'm not sure how I can fix this problem (without removing the supe...

What Cross-Browser issues have you faced?

While developing for multiple sets of browsers, what issues have you faced while development due to differences in browser implementation? To start with I am listing some of those which i faced: A text node in Firefox allows only 4K data. So an XML Ajax response gets split up into multiple text child nodes instead of only one node. It...

Using CSS in ASP.NET

Hi Friends, I have one question.. I am using Asp.Net C# With SQL 2005 I have one grid in that and in grid i put one image box and i want to call image from my css. when i use ImageUrl="~/Images/delete_link_thumb.gif" at image level then image is good but when i call from css through background-image:url(images/edit_link_thumb.gif); t...

Using @media in css of HTML Email

I'm trying to get a HTML email to print a table at a lesser width than it looks on screen. I've put in: @media print{ .style1 { width: 500; } } When I print it still runs off the page. I've set it to a ridiculously small amount with no avail. The style1 is applied to a table which has a width of 100%, I thought the percent ...

Changing CSS Values with Javascript

It's easy to set inline CSS values with javascript. If I want to change the width and I have html like this: <div style="width: 10px"></div> All I need to do is: document.getElementById('id').style.width = value; It will change the inline stylesheet values. Normally this isn't a problem, because the inline style overrides the style...

Need a little CSS advice

I have created a modified version of the suckerfish navigation for a personal project. It looks and performs exactly as I want it to. However, it completely degrades in IE. I spent all day yesterday trying to find a solution with no luck. So I thought I would ask some sharper minds than my own. I am open to just about anything right now....

What are the most Important Usability, Accessebility and SEO guidelines??

Can anyone tell me some of the most important usability, accessibility and SEO guidelines, which must be taken into considerations while developing a good Web2.0 website ??? ...

ASP .Net MVC CSS classes on HTML.Controls

I think I'm missing something relatively simple here, but I'm trying to find a way of applying a CSS class to my controls within my views. I'm using the <%= Html.SubmitButton("Submit", "Edit Plot")%> style method of doing this. Short of putting divs around these elements and applying the styling, is there anyone way of getting access...

Is there a way to reference values as "variables" in CSS?

I am trying to write the HTML and CSS for an internal webapp properly. As much as technically possible, I want the HTML markup to define the content of the page and be completely independent of what the layout will need to be. Obviously it is not possible to do this perfectly. I die a little inside every time I have to add an extra nest...

Three columnm layout with multiple divs in the left and right columns

I have some HTML which looks like this: <body> <div id="panel1" class="panel"> Panel 1 </div> <div id="panel2" class="panel"> Panel 2 </div> <div id="panel3" class="panel"> Panel 3 </div> <div id="panel4" class="panel"> Panel 4 </div> <div id="panel5" class="panel"> Panel 5 </div> <div id="panel6" class="panel"> ...

At what point do you perform front-end optimization?

I'm talking about things like page/stylesheet caching, minifying javascript, etc. Half of me thinks it's better to do these things as early as possible while still in development so I can be consciously aware of more realistic speed and response issues as well as interacting with something that more closely resembles what will be deploy...

How do I do IE conditionals in CSS?

If I want to add padding based on the browser the user is viewing the page in, is there a way in CSS that I can do something like: if IE do padding:5px; else if not IE do padding 10px; ...

CSS layout problem

Hi, At the top of this webpage, there are two elements in the main content area (white background): an image and a logo box. The logo box is floated right and the image has a right-margin which is sufficiently large to accomodate the logo box and a little padding. However, if you make your browser window sufficiently narrow, the logo b...

How do you search a table for a definition to a word in jQuery?

This is a little hard to explain, but I have an HTML table, full of SQL definitions, that cross-talk a great deal. For example, one is talking about "INSERT statements", and mentions a "unique key". Another one of the rows talks about unique keys. I'd like to create little definition bubble (when you hover over "unique key" in the INSER...

CSS box model (margins and padding) for vertical spacing between paragraphs

How should CSS 'margin' and 'padding' be used for vertical inter-paragraph spacing: Can the vertical space between paragraphs be defined using padding and/or using margins? If it can be done with either, then which is the better or more normal one to use? Do you tend to define non-zero padding and non-zero margins, and if so then how m...

What is the method of creating a skin menu?

I want to develop a custom skin or a css for ASP default menu. I want my menu look like the custom controls that are available for purchase like Rad from Telerik. If have tried to google for CSS properties of the ASP Menu but have found only some expose properties. Would really appreciate some help here. ...