CSS and Seperation of Concern

There is an old wisdom in computer engineering that software should be divided into independent components. This is called a separation of concern principle. This principle should be practiced when you write website’s front-end: HTML, CSS, JavaScript. Bellow is a list of rules I try to follow to achieve separation of concern in CSS. CSS in separate file from […]

Code Quality in CSS

One monumental principle of computer engineering is that software should be maintenance. It means that it shouldn’t be hard to read, write, and edit existing software. This is easier to say than practice. However, I believe that few simple rules have make a big difference here. Bellow is a list of my best practices that encourage maintainable CSS code. […]

CSS Guide

I have been working on web development for over two years. I do much more than programming, but that is a major responsibility in my daily work. I like to think that I am pretty good at what I’m doing. My professor use to say that if you cannot learn new technology in three months, […]

CSS Column Layout

When working on websites, one of the most common patterns is column-layout. You want have some main content flow in the center of the page, and have one or two columns on the side. There are many, many solutions for this job. However, I believe that only few of them are “right” solutions. A right […]

Hide Button Text

There is a simple, but genius, method to replace button with icon. I learned it from jQuery. First, create the button, as you would always do. You can use <button> or <input type=”button”> <button>Next</button> Remove the text by setting text-indent with large negative value text-indent: -9999px; overflow: hidden; Finally, set the size and background on […]