css

Change an element's CSS class with JavaScript

How can I change a CSS class of an HTML element in response to an onClick event using JavaScript? ...

Validating Web Pages

I have been developing websites for a couple years now and I almost never check if my pages are valid html and css. My check is by using a site such as browsershots.org and checking how it looks in all the different browsers. However recently I have been taking a college course and the prof wants us to validate every thing we turn in. It...

Best way to implement tab stops in valid XHTML?

For explanation imagine a simple address. Written in a HTML paragraph with line breaks it would like this: Street: Example Street 1 City: Vienna Zip Code: 1010 Country: Austria Most of the time that's completely okay, but sometimes I have to achieve the following output: Street: Example Street 1 City: Vienna Zip Code: 1010 Coun...

Best Way to Handle Multiple Scrolling Columns

I am in the process of developing a web application that consists visually of a header above a body containing four columns of variable-height content. The design gods have decreed it to be fixed height, mainly because each of the columns can potentially get very long, and so (being designers) they are wanting iframes with independent sc...

How do I make <li> with block elements sit beside each other?

I have a mockup layout for something here. Essentially there are sections, columns and fields, which are all written as a combination of <ul> and <li> elements. This is done specifically for later parsing. A snippet of the HTML: <li class="layout"><span class="type">[Column] </span> <ul class="layout-children"> <li class="fie...

How do I change the background color with Javascript?

Anyone know a simple method to swap the background color of a webpage using javascript? ...

Why does the CSS min-width attribute not force a div to have the specified minimum width?

<html> <head> <style type="text/css"> div { border:1px solid #000; min-width: 50%; } </style> </head> <body> <div>This is some text. </div> </body> </html> I believe the div should be 50 percent of the page, unless, for some reason, the text inside the div makes it larger. However, the border around the di...

Testing HTML/CSS/Javascript skills when hiring

When hiring a front-end developer, what specific skills and practices should you test for? What is a good metric for evaluating their skill in HTML, CSS and Javascript? Obviously, table-less semantic HTML and pure CSS layout are probably the key skills. But what about specific techniques? Should he/she be able to effortlessly mock up a ...

How hard is it to master semantic markup and good CSS?

I know this won't be a popular question, because a lot of web designers want to assume that their craft is difficult and valuable. IT IS. But I do not believe that it is difficult because HTML and CSS are difficult to master, I believe its difficult because being a good creative designer is difficult. Please resist the urge to reflexive...

Best CSS color wheel sites

What site(s) do you recommend for looking at complimentary colors for site design? It would also be beneficial to enter a hex or RGB value and have the color wheel spit back complimentary colors. Most popular: Kuler Others in alphabetical order: 4096 Color Wheel Allprofitallfree - color-wheel2 Color Wheel v1.2 Javascript color sch...

What is the best book on CSS?

Having just finished reading David Flanagan's "Javascript: The Definitive Guide" (5th edition), I've found that it's got the best explanation I've ever seen of the core functionality of a language. He explains everything, from identifiers and expressions on up, so clearly that it's easy to visualize how every part of the language works....

How to choose colors in web development

When I build a site I tend to do a bit of graphic design (developer style) in Paint.NET, but how do I know the colors will all display properly on all browsers on different machines? What color depth to you generally code for? 16bit 256 colors etc. ...

Inherit css properties

I have only a basic knowledge of css, is it possible to inherit a property from one style into another style. So for instance I could inherit the font size specified in my default paragrah tag settings into my hyperlink tags. The reason I want to do this is to make it easier to maintain multiple styles. ...

Is there an idiom for letting an element scroll with the page only until it hits the top of the browser?

Basically I am looking to accomplish something similar to the affect that yelp uses to have the map follow you down the page on their search results page but I'd rather have it be instantaneous rather than have it catch up a few seconds after you scroll. I also don't want to just set the position to "fixed" because I want it to scroll u...

How to ensure a DOM element triggers mouseover when it contains a Flash object

I have a div that contains several child elements, one of which is a flash movie. When rolling over this div, I want it to change style to indicate it is rolled over. My problem is that the mouseover and mouseout javascript events don't always trigger, especially if the user moves the mouse over the flash element too quickly. Any sugge...

Style sheet images aren't reloaded by Firefox or Safari

We have found out that Firefox (at least v3) and Safari don't properly cache images referenced from a css file. The images are cached, but they are never refreshed, even if you change them on the server. Once Firefox has the image in the cache, it will never check if it has changed. Our css file looks like this: div#news { background...

Where can I find examples of element heavy web forms?

I would like to look at some examples of some good form layouts (web-based) that have a lot of input fields. I do a lot of web application development and a lot of my forms are input element heavy so I am always looking for good ideas on how to display my forms. For example I have a few list boxes and a lot of text boxes and some drop do...

What is the best absolute width for a webpage?

Assuming a fluid layout is not an option (since that is a different discussion all together), what is the recommended width for a site layout? What are the pros and cons of different sizes? ...

What is the best CSS Framework and are they worth the effort?

Reading on another forum I've came across the world of CSS Frameworks. The one I've been specifically looking at is BluePrint. I was wondering if anyone else had come across CSS frameworks, suggest which is the best and if they are worth the effort? ...

CSS Browser Support Chart

Is there any resource that provides a chart of CSS properties and their support through most browser/OS combinations? For example, if I want to know what browser supports overflow or min-height and any quirks to be aware of in the implementation of these properties and their values, what is the best place to get all this? I have found a...