...

View Full Version : Lists/Netscape



mysterybks
12-29-2007, 02: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.

Dawn

VIPStephan
12-29-2007, 02: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

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

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

Dawn



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum