css

Why doesn't the percentage width child in absolutely positioned parent work in IE7?

I have an absolutely positioned div containing several children, one of which is a relatively positioned div. When I use a percentage-based width on the child div, it collapses to 0 width on IE7, but not on Firefox or Safari. If I use pixel width, it works. If the parent is relatively positioned, the percentage width on the child works...

How do you test layout design across multiple browsers/OSs?

What is a good method for testing website layout designs across multiple browsers and operating systems?...

Detecting font in JavaScript

Suppose I have the following CSS rule in my HTML. body { font-family:Calibri,Trebuchet MS,Helvetica,sans-serif; } How can I detect which one of the defined fonts was used in the user's browser? Edit for people wondering why I want to do this: The font I am detecting contains glyphs not available in other fonts and when the user does n...

In HTML, how to word-break on a dash?

give a relatively simple css: <div style="width:150px;"> 12333-2333-233-23339392-332332323 </div> How do I make it so that the string stays constrained to the width of 150, and simply wraps to a newline on the hyphen? ...

Html CSS Editor

I'm looking for a good editor for both HTML and CSS. I currently use the Firebug Firefox extension, and this is a great tool, but I'm looking for something I can use without necessarily firing up a browser. Ideally it would have a live preview of what I'm coding. Edit: As a student, I have access to MSDN. also, i have access to Windows,...

Can you recommend a good CSS online resource or book?

Are there any favorite online references or good introductory and intermediate/advanced books on this topic that you'd recommend? The backstory is that I'm working on a web development project that is "re-skinning" our existing web site to make it more usable and visually appealing given current technologies that either weren't availabl...

What sites offer free, quality web site design templates?

Let's aggregate a list of free quality web site design templates. There are a million of these sites out there, but most are repetitive and boring. I'll start with freeCSStemplates.org I also think other sites should follow some sort of standards, for example here are freeCSStemplates standards Released for FREE under the Creative C...

How can I make the browser see CSS and Javascript changes?

CSS and Javascript files don't change very often, so I want them to be cached by the web browser. But I also want the web browser to see changes made to these files without requiring the user to clear their browser cache. Also want a solution that works well with version control system such as Subversion....

CSS Background Color in Javascript

How can I set the CSS background color of a HTML element via JavaScript?...

Wrapping lists into columns

I'm using ClodFusion(sic) to populate a template that includes HTML lists (<ul>'s). Most of these aren't that long, but a few have ridiculously long lengths and could really stand to be in 2-3 columns. Is there an HTML, ColdFusion or perhaps JavaScript (I have jQuery available) way to do this easily? It's not worth some over-complicat...

Setting a div's height in HTML with CSS

Hi. I am a CSS newbie trying to layout a table-like page with two columns. I want the rightmost column to dock to the right of the page, and this column should have a distinct background color. The content in the right side is almost always going to be smaller than that on the left. I would like the div on the right to always be tall...

How to set up a CSS switcher in ASP.NET

I'm working on a website which will switch to a new style on a set date. The site's built in semantic HTML and CSS, so the change should just require a CSS reference change. I'm working with a designer who will need to be able to see how it's looking, as well as a client who will need to be able to review content updates in the current l...

Is there a business reason for striving for pure CSS layout?

It seems like every time I try to create a pure CSS layout it takes me much longer than if I'd use a table or two. Getting three columns to be of equal lengths with different amount of data in them seems to require particular fancy hacks, especially when dealing with cross-browser issues. So, my question is this: who are these few table...

FF3 WinXP != FF3 Ubuntu - why?

I've got a website that I've just uploaded onto the interwebs, and it's displaying differently using Firefox 3.0.1 on Ubuntu and WinXP. Two things I've noticed on Ubuntu: The favicon is missing The background color isn't displaying (it's set in the stylesheet) What have I done wrong? The CSS file is being fetched under Ubuntu, so ...

What is the best way to create rounded corners using CSS?

What is the best way to create rounded corners using CSS? ...

Autosizing Textarea

I'm currently working on an internal sales application for the company I work for, and I've got a form that allows the user to change the delivery address. Now I think it would look much nicer, if the textarea I'm using for the main address details would just take up the area of the text in it, and automatically resize if the text was c...

IE8 overflow:auto with max-height

I have an element which may contain very big amounts of data, but I don't want it to ruin the page layout, so I set max-height: 100px and overflow:auto, hoping for scrollbars to appear when the content does not fit. It all works fine in Firefox and IE7, but IE8 behaves as if overflow:hidden was present instead of overflow:auto. I tried o...

Solve the IE select overlap bug

When using IE, you cannot put an absolutely positioned div over a select input element. That's because the select element is considered an ActiveX object and is on top of every HTML element in the page. I already saw people hiding selects when opening a popup div, that leads to pretty bad user experience having controls disappearing. F...

How important is W3C XHTML/CSS validation when finalizing work?

Even though I always strive for complete validation these days, I often wonder if it's a waste of time. If the code runs and it looks the same in all browsers (I use browsershots.org to verify) then do I need to take it any further or am I just being overly anal? What level do you hold your code to when you create it for: a) yourself ...

Best WYSIWYG CSS editor?

[rant] boy how I hate CSS! it's an art that I have no clue about! Spend hours making everything look dandy then you look at the same site in a different browser... WT... I though this was supposed to be a standard!! [/rant] What I really want is a WYCIWYG editor. No not dreamweaver! An editor where you can define an element and ...