PDA

View Full Version : css optimization


havey
10-05-2006, 06:06 PM
Hi all, I was wondering if these can be structured better for performance? Thanks!

.invCellAvlBooked
{
background-color:#dc143c;
font-family:Arial Narrow;
font-size:8pt;
text-align:center;
cursor:default;
}

.invCellNone
{
background-color:#cccccc;
font-family:Arial Narrow;
font-size:8pt;
text-align:center;
cursor:default;
}

mark87
10-05-2006, 06:29 PM
.invCellNone, .invCellAvlBooked {
background: #dc143c;
font: 8pt "Arial Narrow";
text-align: center;
cursor: default;
}

.invCellNone {
background:#ccc;
}

Beagle
10-05-2006, 07:35 PM
Does that actually make it more efficient? It simply reduces the number of statements in the stylesheet, but the matching efficiency is still the same. From what I know, it's the selectors that matter when talking about CSS efficiency.

In which case, check out:
http://developer.mozilla.org/en/docs/Writing_Efficient_CSS