Firefox ul li tag issues

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • AC1234
    New Member
    • Jun 2010
    • 2

    Firefox ul li tag issues

    Hi there,

    I have a bulleted list that i am using to display certain items ..But if there is an ul within an li..it doesnt indent it and shows it close together in the next line

    * This is great
    * And so is this
    o this is so cool

    Even if "this is cool" has to be subitem its not showing as a subitem

    this is the html code

    Code:
    <ul >
        <li>This is great </li>
        <li>And so is this
        <ul>
            <li>this is so cool </li>
        </ul>
        </li>
    </ul>
    It shows perfectly in IE.

    Any help is appreciated..

    Thanks in advance
    AC
    Last edited by Dormilich; Jun 17 '10, 06:15 AM. Reason: Please use [code] tags when posting code
  • Dormilich
    Recognized Expert Expert
    • Aug 2008
    • 8694

    #2
    works perfectly for me (FF 3.6)

    Comment

    • drhowarddrfine
      Recognized Expert Expert
      • Sep 2006
      • 7434

      #3
      Originally posted by AC1234
      Hi there,

      I have a bulleted list that i am using to display certain items ..But if there is an ul within an li..it doesnt indent it and shows it close together in the next line

      * This is great
      * And so is this
      o this is so cool

      Even if "this is cool" has to be subitem its not showing as a subitem

      this is the html code

      Code:
      <ul >
          <li>This is great </li>
          <li>And so is this
          <ul>
              <li>this is so cool </li>
          </ul>
          </li>
      </ul>
      It shows perfectly in IE.

      Any help is appreciated..

      Thanks in advance
      AC
      It shows perfectly in IE.
      Hence your problem. If you use IE as a reference for how things should work you will always fail at what you are trying to do since IE can never be trusted to do anything right.

      In this case, the problem probably lies with IE using margin instead of padding for bullets. (Or is it the other way around?)

      Comment

      • JKing
        Recognized Expert Top Contributor
        • Jun 2007
        • 1206

        #4
        Is there any CSS to go along with this HTML?

        Comment

        • AC1234
          New Member
          • Jun 2010
          • 2

          #5
          Thanks so much for your reply..But for me it doesn't show up well in firefox

          Also the following is specified in my css

          Code:
          ul{
            text-align:left;
           margin-top:-2px;
             /* Removes browser default margins applied to the lists. */
            padding:2px; /* Removes browser default padding applied to the lists. */
            list-style-type:disc;
            
          }
          This html is saved on a sharepoint page ..wonder if that is causing something
          Last edited by Dormilich; Jun 18 '10, 04:52 AM. Reason: Please use [code] tags when posting code

          Comment

          • drhowarddrfine
            Recognized Expert Expert
            • Sep 2006
            • 7434

            #6
            Ignore what I said about the bullet points above since it doesn't apply here and I read the post too quickly.

            The problem is you've changed the margin and padding to a very small number and the indentation is there. Firefox is performing correctly. I don't have IE available to check in that right now but if it isn't doing the same thing then, as always, it's wrong.

            To check this, remove the line about padding and see what happens.

            Comment

            • JKing
              Recognized Expert Top Contributor
              • Jun 2007
              • 1206

              #7
              Firefox by default uses padding to indent lists while IE by default uses margins.
              Setting the padding to 2px causes a minute difference on IE but causes a drastic decrease on firefox.

              Also not sure if this was intended or not but you are only setting margin-top, not the left right or bottom margins. So you aren't really removing browser default margins as a whole.

              Comment

              Working...