css-selectors

JQuery CSS select first & last LI form UL list

Hi folks, looking for some help please with the JQuery CSS selector. I want to identify the first and last LI from the main UL list and alter the CSS class. The first should be class="grid_4 alpha" and the last class="grid_4 omega" <ul> <li id="linkcat-2" class="grid_4 this should be alpha"><h4 class="widgettitle">Blogroll</h4>...

Problems Linking a File

I am trying to get from my mjcbank.htm. to link to products.shtml. And can not figure it out. I am using ssi and the locations are noted below. " <li><a href="../products.shtml">Products</a></li> (this does not work) <li><a href="../aboutus.shtml">About Us</a></li> " The file location is advancedwebdesign/products.shtml The na...

clean up css automaticly with dreamweaver or other tool

Hi, It's not really a coding question, but I don't know where to ask it elsewhere. I'm looking for a tool to clean up unused css selectors. I know this tool Dust-Me selectors, but I want it to clean it automaticly. Can anyone help me with this? ...

How to select multiple div by his unique id number

hi, is there a way to select multiple div with css?? like div id="text-box4" div id="text-box5" div id="text-box7" etc ...

Set different background image dependent on match of child element

Hi there, Can I set a different background-image CSS attribute to my <BODY> tag depending on successful match of a found child <div class="template" /> element? I know of the CSS selector BODY>.template but that alters the template class where an immediate parent match of BODY exists, I want to control BODY if template exists as a chil...

"selected" menu item isn't selected.

When the class "home" is added to an li the background image of the tab is supposed to be a different image than the black background. I'm at my wits end right now and would love any help you could offer. You can see an example at http://www.wilwaldon.com/hornav/index.html Thank you so much for your time, it's greatly appreciated! ...

Is there a CSS optimizer that will discover identical single properties in selectors and group them together?

Here is an example of what I'd expect: Input: a { background: red; } p { background: red; } strong { background: red; color: green; } Output: strong{color:green;} a,p,strong{background:red;} Most optimisers will output something like this: strong{background:red;color:green;} a,p{background:red;} Notic...

jquery get styles from an id

does anyone know how can i get all styles applied to an id using jquery (so i can reuse it later in another tag)? something like css: div#myid{ width:100px; height:100px;} so i can later do something like: for (var parts in $('#myid').css()) alert ('all parts of the style' + parts); ...

How can I set specific CSS classes for links which are images?

This seems painfully simple, but I can't work out how to do it: I want every link on my site to have a specific style on mouseover, so I use a:hover { //style goes here } The thing is, I don't want that style applied to links that are images, but a:hover img { //reset style } doesn't work. What should I try instead? ...

CSS Inheritance: Overriding a parent selector that is a decendant selector

How can I make this link use the child selector without changing or removing the parent selector? (I want the link to be blue.) <html> <head> <style> .parent a { color:Red; } .child { color:Blue; } </style> </head> <body> <div class="parent"> <a class="child" href=...

Using uppercase, dashes or underscores when naming css selectors

What are the best practices when naming CSS selectors? SomeContainerContent some_container_content some-container-content I read the other similar questions here on stack overflow, but there is no general consensus in the answers. I was wondering if anyone else had more to add. ...

jquery show effect shows background color while animated in Firefox 3.6

The problem: I have a site that has a large image for the body background-image. This image is cached and remains constant after the first load. i.e. clicks to different pages do not reload the background. That part works fine. For really large monitors I have the body background-color set to #CCCCCC. The problem is that i have some ...

CSS first-child

Hello there. Is it safe to use CSS pseudo class first-child with regards to browser support and the like? Thanks. ...

IE7 extra padding/margin

http://www.wilwaldon.com/crossing/page3.html If you look at the page in IE7 there is an ungodly amount of space between the top paragraph and the bottom spotlight area. It works fine in all other browsers. If you know of any tricks or hacks to prevent this I'd greatly appreciate this :) Thank you! ...

CSS selector for elements without text siblings

I'm trying to find a CSS selector that can help me distinguish between the <var> tags in these 2 different usages: <p><var>Foo</var></p> And <p>Some text <var>Foo</var> and more text</p> Basically if a var has a sibling that is a text node I need to style it differently. Suggestions? ...

navigation overlapping

On this page: http://wilwaldon.com/crossing/badnav.html notice: the left navigation where it states "A 4 really long page title. And another long title. about half way down the menu. It exceeds the width of the navigation and goes onto the content area. I've tried for about 3 hours to fix this, I'm sure it's just me being overworked a...

Set CSS based on child element

I have the following nav: <div id="nav"> <div id="subnav"> <li><a href="#">One</a></li> <li><a href="#">Two</a></li> </div> </div> The following jQuery: $('#subNav:not(:has(a))').css('background','none'); So #subNav's background is 'none' when its empty. I also want to set $nav background to 'none' at this point, some kind of and?...

Aligning text inside a div

In the below code var panel=<div name="panel" id="panel" style="display:inline;position: absolute; margin-left: auto;margin-right:auto;left: 0;right: 0;width:350px;height: 100px;filter:alpha(opacity=50);">testfield1</div>' ; panel = panel + '&nbsp&nbsp<div id ="name" style="display:inline;position: absolute; margin-left: auto;margin-...

Is it possible to access tags located in a partial view from my css file (external file)?

Hello, Let's say, I've got this. <div id = "myDiv"> <% Html.RenderPartial("MyUserControl"); %> </div> and inside my partial view, I've got this. <% = htm.TextBox("myTextBox")%> How can I style this tag from my Site.css file under Content folder? For instance, I want the back ground color to be green. Thanks for helping ...

Firefox navigation issue. fine in IE and Chrome, random scrollbars.

I have no idea why, but for some reason the top navigation at http://www.wilwaldon.com/crossing/badnav.html creates scroll bars in Firefox 3.6 when you click one of the links. It works fine in IE and Chrome. I've tried everything and can't find a solution for this. Any help would be greatly appreciated. Thank you in advance. ...