Smashing Magazine has an excellent review of JavaScript based data grids. The showcased products cover a range of licenses and price points. With more and more projects moving towards rich user interfaces some of these may come in handy. The data grid from ExtJs, along with the entire ExtJs library, looks like something I can put to use right away.
Wednesday, May 30, 2007
Showcase of Web Based Data Grids
Posted by Greg King at 5:13 PM 0 comments Links to this post
Labels: JavaScript
Wordpress Themes as Web Design Examples
This week this blog has been featured on The New Blog Carnival, a listing of new blogs. The showcase includes blogs of several different targets, but I did notice a list of 74 Wordpress themes. I do not use Wordpress for my own blogs (although I may switch sometime in the future), but they are a good source of web design and CSS ideas. I invite you to go take a look.
Posted by Greg King at 9:59 AM 8 comments Links to this post
Labels: Themes
Tuesday, May 22, 2007
Better CSS Coding
You can find a lot of advice on how to write optimized CSS code. Unfortunately, the more optimized the code is, the harder it is to maintain. I like to recommend to people to focus on writing clear and understandable CSS code. Once your CSS is easy to understand, optimizations such as reduction of duplicated code will soon follow. Thus I was happy to see Smashing Magazine have a post 70 Expert Ideas For Better CSS Coding that focuses on how to write better CSS code.
Posted by Greg King at 10:28 AM 0 comments Links to this post
Labels: CSS
Thursday, May 17, 2007
Using Ems for More than Font Size
It is common practice to use the em unit to specify font sizes in CSS. What I have not seen very often is using ems to specify other styles like width. For example, say you have a fixed width menu specified with the following style:
div.menuThis is good practice since you or the end user can change the font size of the page and the font size of your menu will change accordingly. However, since the width of your menu is fixed, the text may wrap as font size increases. An alternative style would be:
{
width: 175px;
font-size: 1.1em;
}
div.menuSpecifying the width in ems forces the width to be relative to the font size. Therefore as the font size of your page increases, the absolute width of your menu increases as well.
{
width: 10em;
font-size: 1.1em;
}
For more information on using ems for widths check out this article on the css-discuss Wiki.
Posted by Greg King at 11:03 AM 8 comments Links to this post
Labels: CSS
Tuesday, May 15, 2007
A Nested Format for CSS Files
As my comfort level with Cascading Style Sheets has increased, I found my CSS files growing in size and complexity. The struggle has been to keep these files organized and easy to maintain. My approach in the past has been to keep my CSS selectors in the following order:
- Tags
- Classes
- IDs
Last week I stumbled on the Sass framework. Sass is a Ruby library for generating CSS files. While I do not use Ruby so I cannot make use of the framework, one of the output formats intrigued me. This format uses whitespace to give the appearance of one selector being nested inside of another.
Original
tableNested
{
margin: 25px 0 25px 0;
border: 1px solid black
}
thead th
{
text-align: left;
font-size: 1.2em;
}
th.numeric,
td.numeric
{
text-align: right;
}
tbody th
{
text-align: left;
}
table {
margin: 25px 0 25px 0;
border: 1px solid black; }
table .numeric {
text-align: right; }
table thead {}
table thead th {
text-align: left;
font-size: 1.2em; }
table tbody {}
table tbody th {
text-align: left; }
If you pay attention to the braces you will notice that the selectors are not actually nested, but the whitespace give the illusion that they are. I am still experimenting how explicit to be when nesting the selectors. I like the format because it corresponds to the structure of the related HTML document and makes it easier to see duplicated style rules.Give this CSS format a try and let me know what you think.
Posted by Greg King at 9:33 AM 0 comments Links to this post
Labels: CSS