css

is using class names like 'right' considered bad practice?

If I have class names such as "left", "right", "clear" and xhtml like <a href="index.php" class="right continueLink">Continue</a> With CSS like .right { float: right; } I know it's not a semantic name, but it does make things much easier sometimes. Anyway, what are your thoughts? ...

What do you wish you knew before you spent hours trying to fix a bug in IE6

Mine would have to be the float and margin bugs... If you float an element, and then specify a margin for it, it will double the margin. The solution to this is to add display: inline to the element. This will stop the double margin, and all other browsers will ignore it because only block level objects can be floated. ...

Cross Browser dropdown/popup menu over a flash movie

I need to make my dropdown menu apprear over the top of a flash movie, how is this done cross browser? It can be done, IBM do it: http://www.ibm.com/us/ so do GE: http://www.ge.com/ Setting the the WMODE to transparent doesn't work for Firefox Putting it into an Iframe doesnt work below IE7 Any one know the best way to achieve this? ...

How can I define an accesskey for an invisible HTML element

I have a <button> with an accesskey assgined to it. The accesskey works fine as long as the button is visible, but when I set display: none or visibility: hidden, the accesskey no longer works. Also tried without success: Use a different element type: a, input (various types, even typeless). Assign the accesskey to a label that wraps ...

Need to set color of <h1> link

This is the css for setting the color for h1 text that is linked: .nav-left h1 a, a:visited{ color:#055830; } <div class="nav-left"> <h1><a href="/index.php/housing/">Housing</a></h1> </div> It does not look like it is working appropriately, any help is appreciated. ...

ASP.NET Menu Parent Menu Item Highlighting on Hover when Flyouts are enabled.

Hi, I have a ASP.Net Menu Control with three levels and flyouts enabled. I want to highlight the parent items (right upto the top level parent) whenever a user hovers over the menu items. I do not want to use a client side solution as described here: http://www.codeproject.com/KB/webforms/AspMenuParentHighlighting.aspx Is there an ele...

jCarousel -help with new skin

I'm creating a new theme for the jCarousel component that I'll be using for my web site and the dimension for this component will be: width:485px , height:161px including the two arrows and what i want is to have 3 items per cycle each having the a dimension of 140X100 (width X height) with 5px margin, and 3/4 of the skin is done but I'm...

How do I get 'footer' content on a master page to push down when main content requires it?

Been a while since I've dealt with ASP.NET and this is the first time I've had to deal with master pages. Been following tutorials everything is fine except a problem I'm having with the footer. The master page has divs for topContent, mainContent and footerContent. In mainContent I have a ContentPlaceHolder. The default content page...

Applying CSS to Text inputs with Classes

I'm using jQuery validate on a form I am building and it is working great. What I want to do is when something is invalid to have the text field change colors and the error message to be white. I figured the following CSS would work: label .error {color: white; font-weight: bold;} input .error {background-color: pink; border: 1px dashed...

Images & Hyperlink Borders - Ghost 1px x 1px Border

I've an image that is wrapped in an anchor tag that, through jQuery, triggers an action somewhere else on the page. When I click on the image, two tiny 1px by 1px boxes show up in the upper and lower left corners of the image. My CSS styles explicitly state no borders for images: a,img { border: 0; } It also seems to only happen in Fi...

Evaluate a css expression only in IE<7 w/out using conditional comments?

I already know: "Don't use css expressions!" My question is not about whether I should be using an expression or if there is an alternative; my question is simply: Can I get a css expression to only be evaluated in versions of IE prior to version 7 without using conditional comments? I occasionally use an underscore hack to hide a rule...

How do I wrap text in a pre tag?

pre tags are super-useful for code blocks and for debugging output when writing scripts, but how do I make the text word-wrap instead of running one long line? ...

IE CSS Fieldset border extends too far to the right: Why??

I have defined a fieldset in HTML, and applied the following (simple) CSS rules to it: fieldset { margin: 2em 0; position:relative; padding: 1em; border:1px solid #ccc; } Everything is great, no big deal, except in all versions (well, up to 7 as far as I know) of IE the top border -- but not, interestingly, the bottom ...

What's the best way to link to an external style sheet in SharePoint

I have some user controls that I'm loading in SharePoint and I would prefer to have all those styles contained in an external style sheet. What's the best way to link to an external stylesheet in CSS? Thanks. ...

Shortcut for commenting CSS in VS 2008

When I press the standard Ctrl + E, C (an other variants) in VS2008 whilst editing a CSS file, it says that command is not available. How do I setup a shortcut to apply a plain old /* */ comment to selected text in VS? Thanks ...

IE7 and the CSS table-cell property

So I just love it when my application is working great in Firefox, but then I open it in IE and... Nope, please try again. The issue I'm having is that I'm setting a CSS display property to either none or table-cell with JavaScript. I was initially using display: block, but Firefox was rendering it weird without the table-cell property...

Are there any CSS standards that I should follow while writing my first stylesheet?

I am currently working on my first website. I have no idea where to start on the CSS page, or if there are any standards that I should be following. I would appreciate any links or first-hand advise. ...

Align element under other element through css

I have a really simple search form with the following Label ("Search") Textbox (fixed width) Submit button "Advanced" link Label, textbox and submit are all on one horizontal line and centered. Now I would like my advanced link to be under the submit button. Any ideas? ...

If the html says <div id="two words", how do I write the CSS selector in the style sheet?

If it said "oneword", then I could write "#oneword", but what do I write when there is a space in the word? ...

Can I fetch the value of a non-standard CSS property via Javascript?

I am trying to read a custom (non-standard) CSS property, set in a stylesheet (not the inline style attribute) and get its value. Take this CSS for example: #someElement { foo: 'bar'; } I have managed to get its value with the currentStyle property in IE7: var element = document.getElementById('someElement'); var val = element.curr...