7 Replies Latest reply on Aug 26, 2007 4:40 AM by Newsgroup_User

    Should I use a Div instead of a UL?

    ~Billy~ Level 1
      I have used three unordered-lists for my navbar. On validation it suggests I should'nt have the opening UL as a "wrapper". Should I make the wrapper a div instead? or is it ok to have a UL as a wrapper with other UL's inside it?

      <ul id="wrapper">
      <ul id="threebarmenu">
      <li class="firstlinespace">line one</li>
      <li class="secondlinespace">line two</li>
      <li class="thirdlinespace">line three </li>
      </ul>
      <ul id="leftnav">
      <li><!--#include virtual="/newsite/test/ssidivless/ssi_menu_divless.shtml" --></li>
      <li class="leftnavCrouton">leftnavCrouton</li>
      </ul>
      <br style="clear: both;">
      </ul>

      Or... Could I just keep the UL's have lay them out like this? -

      <ul id="threebarmenu">
      <li class="firstlinespace">line one</li>
      <li class="secondlinespace">line two</li>
      <li class="thirdlinespace">line three </li>
      </ul>

      <ul id="navigation">
      <ul id="leftnav">
      <li><!--#include virtual="/newsite/test/ssidivless/ssi_menu_divless.shtml" --></li>
      <li class="leftnavCrouton">leftnavCrouton</li>
      </ul>
      <br style="clear: both;">
      </ul>
        • 1. Re: Should I use a Div instead of a UL?
          Level 7
          On Sat, 25 Aug 2007 03:39:26 +0000 (UTC), "~Billy~"
          <webforumsuser@macromedia.com> wrote:

          >I have used three unordered-lists for my navbar. On validation it suggests I
          >should'nt have the opening UL as a "wrapper". Should I make the wrapper a div
          >instead? or is it ok to have a UL as a wrapper with other UL's inside it?
          >
          > <ul id="wrapper">
          > <ul id="threebarmenu">
          > <li class="firstlinespace">line one</li>
          > <li class="secondlinespace">line two</li>
          > <li class="thirdlinespace">line three </li>

          > <ul id="leftnav">
          >
          • <!--#include virtual="/newsite/test/ssidivless/ssi_menu_divless.shtml"
            >--></li>
            > <li class="leftnavCrouton">leftnavCrouton</li>
            >

          > <br style="clear: both;">
          >


          What is in the include file - is that causing the problem
          --

          ~Malcolm N....
          ~
          • 2. Re: Should I use a Div instead of a UL?
            ~Billy~ Level 1
            The include file is my main tab menu.

            I have removed the opening and closing ul statements and replaced them with a Div wrapper because I think I shouldnt have used a scematic element (ul) for a wrapper, instead I have used a scematically neutral div.

            Before I had -

            <ul id="wrapper">
            <ul id="threebarmenu">
            <li class="firstlinespace">line one</li>
            <li class="secondlinespace">line two</li>
            <li class="thirdlinespace">line three </li>
            </ul>
            <ul id="leftnav">
            <li><!--#include virtual="/newsite/test/ssidivless/ssi_menu_divless.shtml" --></li>
            <li class="leftnavCrouton">leftnavCrouton</li>
            </ul>
            <br style="clear: both;">
            </ul>

            I now have -

            <div id="wrapper">
            <ul id="threebarmenu">
            <li class="firstlinespace">line one</li>
            <li class="secondlinespace">line two</li>
            <li class="thirdlinespace">line three </li>
            </ul>
            <ul id="leftnav">
            <li><!--#include virtual="/newsite/test/ssidivless/ssi_menu_divless.shtml" --></li>
            <li class="leftnavCrouton">leftnavCrouton</li>
            </ul>
            <br style="clear: both;">
            </div>

            • 3. Re: Should I use a Div instead of a UL?
              Level 7
              SEMANTIC, not scematic.

              > <ul id="wrapper">
              > <ul id="threebarmenu">

              You cannot nest <ul> tags like this. That's the cause of the problem.

              I don't like your approach to this at all. You are making it MUCH too
              complex.

              Why do you have includes within lists again?

              --
              Murray --- ICQ 71997575
              Adobe Community Expert
              (If you *MUST* email me, don't LAUGH when you do so!)
              ==================
              http://www.dreamweavermx-templates.com - Template Triage!
              http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
              http://www.dwfaq.com - DW FAQs, Tutorials & Resources
              http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
              ==================


              "~Billy~" <webforumsuser@macromedia.com> wrote in message
              news:fap3hb$ojh$1@forums.macromedia.com...
              > The include file is my main tab menu.
              >
              > I have removed the opening and closing ul statements and replaced them
              > with a
              > Div wrapper because I think I shouldnt have used a scematic element (ul)
              > for a
              > wrapper, instead I have used a scematically neutral div.
              >
              > Before I had -
              >
              > <ul id="wrapper">
              > <ul id="threebarmenu">
              > <li class="firstlinespace">line one</li>
              > <li class="secondlinespace">line two</li>
              > <li class="thirdlinespace">line three </li>
              >
              > <ul id="leftnav">
              >
              • <!--#include virtual="/newsite/test/ssidivless/ssi_menu_divless.shtml"
                > --></li>
                > <li class="leftnavCrouton">leftnavCrouton</li>
                >

              > <br style="clear: both;">
              >
              >
              > I now have -
              >
              > <div id="wrapper">
              > <ul id="threebarmenu">
              > <li class="firstlinespace">line one</li>
              > <li class="secondlinespace">line two</li>
              > <li class="thirdlinespace">line three </li>
              >
              > <ul id="leftnav">
              >
              • <!--#include virtual="/newsite/test/ssidivless/ssi_menu_divless.shtml"
                > --></li>
                > <li class="leftnavCrouton">leftnavCrouton</li>
                >

              > <br style="clear: both;">
              > </div>
              >
              >
              >


              • 4. Re: Should I use a Div instead of a UL?
                Level 7
                On Sat, 25 Aug 2007 11:24:27 +0000 (UTC), "~Billy~"
                <webforumsuser@macromedia.com> wrote:

                >The include file is my main tab menu.
                >
                > I have removed the opening and closing ul statements and replaced them with a
                >Div wrapper because I think I shouldnt have used a scematic element (ul) for a
                >wrapper, instead I have used a scematically neutral div.
                >
                >
                Someone pointed to this excellent site sometime in the last week or so
                - and it gives you plenty of examples of CSS styled lists

                http://css.maxdesign.com.au/listamatic/
                --

                ~Malcolm N....
                ~
                • 5. Re: Should I use a Div instead of a UL?
                  Level 7
                  .oO(~Billy~)

                  >I have used three unordered-lists for my navbar. On validation it suggests I
                  >should'nt have the opening UL as a "wrapper". Should I make the wrapper a div
                  >instead? or is it ok to have a UL as a wrapper with other UL's inside it?
                  >
                  > <ul id="wrapper">
                  > <ul id="threebarmenu">

                  We already told you more than once that a list ('ul' or 'ol') can only
                  contain list items ('li') as its children, nothing else. The above is
                  invalid code.

                  And why are there so many IDs and classes? A class on every single item
                  is a pretty good sign of a broken design or a misunderstanding of CSS.
                  What is it that you're trying to achieve actually?

                  Micha
                  • 6. Re: Should I use a Div instead of a UL?
                    ~Billy~ Level 1
                    Hey Micha if your gonna get knarky then dont bother replying to me, is that clear enough?
                    • 7. Re: Should I use a Div instead of a UL?
                      Level 7
                      The best and clearest suggestions yet, and you reply this way?

                      --
                      Murray --- ICQ 71997575
                      Adobe Community Expert
                      (If you *MUST* email me, don't LAUGH when you do so!)
                      ==================
                      http://www.dreamweavermx-templates.com - Template Triage!
                      http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
                      http://www.dwfaq.com - DW FAQs, Tutorials & Resources
                      http://www.macromedia.com/support/search/ - Macromedia (MM) Technotes
                      ==================


                      "~Billy~" <webforumsuser@macromedia.com> wrote in message
                      news:faqcgq$80m$1@forums.macromedia.com...
                      > Hey Micha if your gonna get knarky then dont bother replying to me, is
                      > that clear enough?