Announcement

Collapse
No announcement yet.

XTHML and lists

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • XTHML and lists

    Why is it that with XTML and the Transitional DOCTYPE I have to use certain objects in order to make <ul> and <li> tags legal to use? Or, what can I do to make them legal without changing the DOCTYE, if anything at all?

  • #2
    Not sure what you mean....

    Code:
    <ul>Some List
      <li>item 1</li>
      <li>item 2</li>
      <li>item 3</li>
      <li>item 4</li>
    </ul>
    The above is legal in XHTML.
    Translations provided by Google.

    Wayne Luke
    The Rabid Badger - a vBulletin Cloud demonstration site.
    vBulletin 5 API - Full / Mobile
    Vote for your favorite feature requests and the bugs you want to see fixed.

    Comment


    • #3
      Are you sure?
      Originally posted by W3C XHTML Validator
      Line 35, column 3: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
      Also note that this was submitted via a form and is stored in a database, not typed in by hand.

      Comment


      • #4
        Originally posted by [b
        W3C XHTML Validator[/b]]Line 35, column 3: document type does not allow element "ul" here; missing one of "object", "applet", "map", "iframe", "button", "ins", "del" start-tag
        The missing one of error, suggests you've nested the list inside something that lists can not be directly nested inside. Such as font tag for example.

        Comment


        • #5
          You can't nest them inside font tags?

          Comment


          • #6
            No.

            Using font tags is sooooo 1997...

            Seriously.. if you MUST use those, it'd have to look like:

            <ul>
            <li><font color="#660000">Moo!</font></li>
            </ul>

            Comment


            • #7
              There's no way I can change that. I suppose that when that post is bumped off the main page it'll go back to being compliant. Thanks.

              Comment


              • #8
                You could use CSS for it.

                e. g. in the table surrounding the list: <table style="color:#000000; font:10pt verdana;">content including list goes here</table>

                or in the ul-Tag: <ul style="...">

                or you use a global CSS-Definition, like

                li { color: #000000; font: 10pt verdana; }

                I haven't tested it, but this should work.

                A nasty workaround would probably be surrounding the list with <map id="whatever"> ... </map>
                Hints & Tips:
                [[vB3] More Spiders / Indexers / Archives for vB3 - list]|[List of one-time-emails to ban]


                http://sfx-images.mozilla.org/affili...efox_80x15.png

                Comment


                • #9
                  The site is CSS compliant, however my news script that I wrote uses a form that you fill out, submit, and then it's posted. It's no biggie, it'll be gone soon enough.

                  Comment

                  widgetinstance 262 (Related Topics) skipped due to lack of content & hide_module_if_empty option.
                  Working...
                  X