E-Mail:

Balance your CSS Columns with JavaScript

  • No Related Post

Unlike common belief might indicate, Javascript is not simply for pop-ups and other stereotyped uses. It can also be used to help align your CSS columns. Using Javascript allows designers to easily apply specific values to the CSS properties that might otherwise be a little cumbersome.

In this case, I’ve simply applied the method to a standard 3 column layout, all variable widths, where I shall assume that the content area is going to be the tallest region.

In cases where I could not make this assumption, we’d need to add some if else loops to the javascipt file to determine which case to use. But because this is a static page that I’m making up myself, and is a test case of a concept, I’m going to keep things lean for now and rest on my assumptions.

What Do You Think?

 
51 queries / 0.189 seconds.