3 Replies Latest reply on Aug 31, 2008 12:53 PM by malcster2

    id selector

    New2CSS
      I have created an ID of "#header ul" and added it to <ul> tag but DW will apply the style to the list.
      When adding it to the tag it was not listed in the pop-up menu
      If I remove the UL or remove the space between header and ul DW will then apply the style.

      I tried it with a blank page; same thing.
      I have restarted my computer; no change.

      What's going on!!!????
        • 1. Re: id selector
          Level 7
          Hello,

          Hard to understand what you mean without seeing the HTML.
          This is a guess of course, but maybe it will help.

          #header ul means apply the stlye to the ul in a container with the ID of
          header.
          For example,

          <div id="header"><ul>

          If you want the ul to have the ID, <ul id="header">
          then the CSS would be ul#header {....
          or just #header {...

          If that doesn't help, please paste the HTML in question, or better yet, a
          link to the page.

          Take care,
          Tim



          "New2CSS" <webforumsuser@macromedia.com> wrote in message
          news:g9eio1$qsk$1@forums.macromedia.com...
          >I have created an ID of "#header ul" and added it to
          tag but DW
          >will
          > apply the style to the list.
          > When adding it to the tag it was not listed in the pop-up menu
          > If I remove the UL or remove the space between header and ul DW will then
          > apply the style.
          >
          > I tried it with a blank page; same thing.
          > I have restarted my computer; no change.
          >
          > What's going on!!!????
          >
          > #header ul {
          > margin: 0px;
          > padding: 0px;
          > list-style-type: none;
          > }
          >


          • 2. Re: id selector
            Level 7
            >I have created an ID of "#header ul" and added it to
            tag but DW
            >will

            Does this mean this -

            <ul id="#header ul"

            ???

            If so, that's improper syntax in several ways -

            1. ID values cannot begin with "#"
            2. ID values cannot contain spaces

            Or are you talking about this being a selector?


            --
            Murray --- ICQ 71997575
            Adobe Community Expert
            (If you *MUST* email me, don't LAUGH when you do so!)
            ==================
            http://www.projectseven.com/go - DW FAQs, Tutorials & Resources
            http://www.dwfaq.com - DW FAQs, Tutorials & Resources
            ==================


            "New2CSS" <webforumsuser@macromedia.com> wrote in message
            news:g9eio1$qsk$1@forums.macromedia.com...
            >I have created an ID of "#header ul" and added it to
            tag but DW
            >will
            > apply the style to the list.
            > When adding it to the tag it was not listed in the pop-up menu
            > If I remove the UL or remove the space between header and ul DW will then
            > apply the style.
            >
            > I tried it with a blank page; same thing.
            > I have restarted my computer; no change.
            >
            > What's going on!!!????
            >
            > #header ul {
            > margin: 0px;
            > padding: 0px;
            > list-style-type: none;
            > }
            >

            • 3. Re: id selector
              malcster2 Level 1
              i take it 'header' is a div.

              in css file, if you put in #header ul{........}.

              any ul's you have within the header div will now inherit the formatting code you have put in the css file.

              you don't need to assign any styles to your <ul> tags, just make sure you set the id for header in your html, i.e <div id="header">