extra space in menu

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Brian

    extra space in menu

    Hello group,

    http://people.umass.edu/btrembla/ (html 4.01/strict)

    uses a conventional menu marked up as a list, and css




    to enhance their appearance. I added
    li a {display: block}
    so that the link would extend across the li element. In MSIE
    5.0/Win2k, there is extra space below each li, which goes away if I
    remove the li a block declaration. That extra space is not there in
    Moz 1.3 nor O7. I can certainly hide it from MSIE using the child
    selector, but wanted to know if there was anything else I could do to
    remove that extra space.

    --
    Brian
    follow the directions in my address to email me

  • Peter Foti

    #2
    Re: extra space in menu

    Hi Brian,

    Try removing all whitespace surrounding the <a></a> element. For example:

    <LI CLASS="menuitem ">
    <A HREF="cv.html" TITLE="c.v.">cu rriculum vit&aelig;</A>
    </LI>

    should become:

    <LI CLASS="menuitem "><A HREF="cv.html" TITLE="c.v.">cu rriculum
    vit&aelig;</A></LI>

    I don't know if this will help or not, but I have found odd little quirks in
    IE that were corrected by removing whitespace.
    HTH
    Peter Foti


    "Brian" <usenet1@mangym utt.com.invalid-remove-this-part> wrote in message
    news:pwncb.5697 76$o%2.254678@s ccrnsc02...[color=blue]
    > Hello group,
    >
    > http://people.umass.edu/btrembla/ (html 4.01/strict)
    >
    > uses a conventional menu marked up as a list, and css
    >
    > http://people.umass.edu/btrembla/css/brian.css
    > http://people.umass.edu/btrembla/css/screen.css
    >
    > to enhance their appearance. I added
    > li a {display: block}
    > so that the link would extend across the li element. In MSIE
    > 5.0/Win2k, there is extra space below each li, which goes away if I
    > remove the li a block declaration. That extra space is not there in
    > Moz 1.3 nor O7. I can certainly hide it from MSIE using the child
    > selector, but wanted to know if there was anything else I could do to
    > remove that extra space.
    >
    > --
    > Brian
    > follow the directions in my address to email me
    >[/color]


    Comment

    • Brian

      #3
      Re: extra space in menu

      Peter Foti wrote:[color=blue]
      > "Brian" <usenet1@mangym utt.com.invalid-remove-this-part> wrote in message
      > news:pwncb.5697 76$o%2.254678@s ccrnsc02...
      >[color=green]
      >>http://people.umass.edu/btrembla/ (html 4.01/strict)
      >>
      >>li a {display: block}
      >>so that the link would extend across the li element. In MSIE
      >>5.0/Win2k, there is extra space below each li[/color]
      >
      > Try removing all whitespace surrounding the <a></a> element.[/color]

      Tried that. No difference. I think I'm actually relieved that it
      didn't fix it; I had little desire to edit every page on the site.
      Even with search and replace it would have been tedious, because the
      menu changes from page to page.

      --
      Brian
      follow the directions in my address to email me

      Comment

      • kchayka

        #4
        Re: extra space in menu

        Brian wrote:[color=blue]
        > Peter Foti wrote:[color=green]
        >> "Brian" <usenet1@mangym utt.com.invalid-remove-this-part> wrote in message
        >> news:pwncb.5697 76$o%2.254678@s ccrnsc02...
        >>[color=darkred]
        >>>http://people.umass.edu/btrembla/ (html 4.01/strict)
        >>>
        >>>li a {display: block}
        >>>so that the link would extend across the li element. In MSIE
        >>>5.0/Win2k, there is extra space below each li[/color]
        >>
        >> Try removing all whitespace surrounding the <a></a> element.[/color]
        >
        > Tried that. No difference.[/color]

        I think you also need to remove white space between list items, too:
        <li><a...></a></li><li>...
        [color=blue]
        > I think I'm actually relieved that it
        > didn't fix it; I had little desire to edit every page on the site.
        > Even with search and replace it would have been tedious, because the
        > menu changes from page to page.[/color]

        That's where something like a preprocessor or some form of server-side
        processing comes in handy. :)

        --
        To email a reply, remove (dash)un(dash). Mail sent to the un
        address is considered spam and automatically deleted.

        Comment

        • Brian

          #5
          Re: extra space in menu

          kchayka wrote:[color=blue]
          > Brian wrote:
          >[color=green][color=darkred]
          >>>> http://people.umass.edu/btrembla/ (html 4.01/strict)
          >>>>
          >>>> li a {display: block}
          >>>> so that the link would extend across the li element. In MSIE
          >>>> 5.0/Win2k, there is extra space below each li
          >>>
          >>> Try removing all whitespace surrounding the <a></a> element.[/color]
          >>
          >> Tried that. No difference.[/color]
          >
          > I think you also need to remove white space between list items, too:
          > <li><a...></a></li><li>...[/color]

          I just tried that, too. Still no difference. I read some list
          examples posted in another thread. I notice several used width: 100%
          for li a {width: 100%}, I suppose to correct an error in MSIE 5/win (I
          have borders, so those are being added perhaps?). But this screws
          things up in Mozilla, so there's body>li a {width: auto}. I added to
          my stylesheet something similar. li a {width: 100%}, li>a {width:
          auto}. It's better now -- there is not an extra line of space -- but
          there is still some space where there ought not be, below and to the
          left <a> element in a <li> element. I've uploaded the changes.



          [color=blue][color=green]
          >> I had little desire to edit every page on the site. Even
          >> with search and replace it would have been tedious, because
          >> the menu changes from page to page.[/color]
          >
          > That's where something like a preprocessor or some form of
          > server-side processing comes in handy. :)[/color]

          I tried two, but couldn't make them work. Since then, someone
          suggested a few others, but they require a linux emulator. I
          downloaded that, but haven't made the time to install it and learn the
          new programs.

          --
          Brian
          follow the directions in my address to email me

          Comment

          • Brian

            #6
            Re: extra space in menu

            Brian wrote:[color=blue]
            >[color=green][color=darkred]
            >>>> http://people.umass.edu/btrembla/ (html 4.01/strict)[/color][/color]
            >
            > there is still some space where there ought not be, below and to the
            > left <a> element in a <li> element.[/color]

            Update: I put the ul menu in a div#nav to include other navigational
            stuff, and to my suprise the the space in the left of each <li>
            element disappeared. It was the result of me floating the parent
            <ul>, but went away when I floated the parent div of the ul.

            The vertical spacing is there on other sites that use similar markup,
            so that appears to be how MSIE 5/Win (mis?)renders it. Other sites
            degrade a little better because of their color scheme. Mine doesn't
            degrade quite as well, but it's nothing I can't live with.

            --
            Brian
            follow the directions in my address to email me

            Comment

            Working...