I'm a Web Developer, how do I get better at design?
View Single Post
April 18th, 2013 (4:21 PM).
C++ Developer Extraordinaire
Join Date: Dec 2009
Classes and IDs are used for very different things. Classes are things that you can use anywhere for style or code functionality purposes, whereas IDs are definite anchors to particular elements. How you separate your CSS between the two is a large part of making modular CSS. For example, I commonly have highly general CSS classes that I can add to things, like an "error" class that will turn text red, or if it is a particular type of element, to draw a little warning sign next to it. Another common one is "loading" which will change the background with a pulser animation to indicate something is in progress.
That way if there is an error in validation, the only thing I have to do is get a handle on the element and add the class "error". Also if I am waiting for an AJAX call to return I can set the "loading" class when it starts, and remove it when it's done.
You can automate an awful lot with CSS classes, because you can use them to reference hierarchies too, so you can have a selector for "div.someclass div.content" to act on anything that was below that element with the class. This means you can make huge graphical changes with a simple adding or removing of a single class from an element.
Don't neglect tools if they prove useful.
Very good points, especially the error one.
Another thing I've been considering is following photoshop tutorials about template design. Even though its copying it can give me a better feel for interface/ui design. My project I've been working on now is making a registration/login system with form/processing to log into a simple page. Nothing extreme just enough to design a good login/registration system. Mainly so I can focus on the design.
Anyone else have any helpful advice or links?
Also Known As:
View Public Profile
Send a private message to KingCharizard
Find all posts by KingCharizard
Find threads started by KingCharizard