Archive for the ‘CSS’ Category
Shorthand Border Radius
When I first started using the border-radius property, I was slightly confused as to why it didst have a shorthand counterpart. I later found out it did indeed have one, but it wasn’t used much at all because it’s slightly different to the shorthand used with padding &...
Forgotten About :focus?
The :focus pseudo-class in CSS works much the same way as :hover and :selected but instead of having a momentary effect, it lasts for as long as the said element is active. By that, I mean if you clicked on a form element with a :focus pseudo-class, the background/border/etc would change and stick like that...
Customizing The YUI CSS Reset
I personally use the Yahoo! YUI CSS reset. I just like how it makes everything clean and text & same size. If you’re not using a reset, you must explain why! There’s just a few things I wish it has, but doesn’t so I’ve added...
The Easy Way To Clear Floats
I bet you’ve used an empty div to clear floats before. I always used <div class="clear"></div>, in fact you’ll see it used all throughout the code for this site! I recently learn that setting overflow: hidden; on whatever is wrapping the floated elements works just as well and keeps your code cleaner! What methods do you use...
Input Type CSS Selector
Have you ever found yourself giving text inputs a class of text-input (or anything like that) in order to give it some style? Well if you want to style each element the same, then there is a better and sometimes quicker method of doing this. I’ll take a basic form and show how the code looks...
