View Full Version : Lists/Netscape

12-29-2007, 03:11 PM
I have a page http://www.sleuthedit.com/Spotlight.html that uses a lot of lists. Currently I have them with the same ID on each and have just run validation and it says this is incorrect. It shows fine in every browser I've tested (Firefox, IE, and Netscape), but a client says it's blank in her Netscape. I'm thinking this must be the reason. So, my question is, if you have multiple lists, how do you not have to list a different number by each one on the page. Each month the amount of these will change. I don't want to clutter up my css page with so many repeats of the same code.


12-29-2007, 03:37 PM
Many repeats of the same code is alright but the way you do it could be improved.

An ID may only be used once on a page as it’s unique and must not be used more times in a single document. The opposite is the use of classes. Classes are specifically made to denote repeating structures of code and you can use them as much as you want in a single document. However, one can also push the use of IDs and classes too hard. I’d recommend that you remove the IDs completely (and also the classes for the list items) as they aren’t necessary at all. You can save a lot of bytes if you just remove them and style your lists like this:

td ul {…} /* styles all list elements within table cells */
td li {…} /* styles all list items (within lists, of course) within table cells

12-29-2007, 03:59 PM
This looks like MS Expression/FrontPage's "design" mode. Am I correct?

12-29-2007, 07:02 PM
I use Expression Web and write some of the code by hand.