Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4

Thread: Lists/Netscape

  1. #1
    New Coder
    Join Date
    Feb 2007
    Posts
    90
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Lists/Netscape

    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

  • #2
    The fat guy next door VIPStephan's Avatar
    Join Date
    Jan 2006
    Location
    Halle (Saale), Germany
    Posts
    8,932
    Thanks
    6
    Thanked 1,041 Times in 1,014 Posts
    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:

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

  • #3
    The Apostate Apostropartheid's Avatar
    Join Date
    Oct 2007
    Posts
    3,215
    Thanks
    16
    Thanked 265 Times in 263 Posts
    Aha.
    This looks like MS Expression/FrontPage's "design" mode. Am I correct?

  • #4
    New Coder
    Join Date
    Feb 2007
    Posts
    90
    Thanks
    1
    Thanked 0 Times in 0 Posts

    reply

    I use Expression Web and write some of the code by hand.

    Dawn


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •