469,625 Members | 1,080 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,625 developers. It's quick & easy.

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

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

Jul 20 '05 #1
5 3889
Hi Brian,

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

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

should become:

<LI CLASS="menuitem"><A HREF="cv.html" TITLE="c.v.">curriculum
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" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message
news:pwncb.569776$o%2.254678@sccrnsc02...
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

Jul 20 '05 #2
Peter Foti wrote:
"Brian" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message
news:pwncb.569776$o%2.254678@sccrnsc02...
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.


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

Jul 20 '05 #3
Brian wrote:
Peter Foti wrote:
"Brian" <us*****@mangymutt.com.invalid-remove-this-part> wrote in message
news:pwncb.569776$o%2.254678@sccrnsc02...
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.


Tried that. No difference.


I think you also need to remove white space between list items, too:
<li><a...></a></li><li>...
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.


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.

Jul 20 '05 #4
kchayka wrote:
Brian wrote:
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.


Tried that. No difference.


I think you also need to remove white space between list items, too:
<li><a...></a></li><li>...


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.

http://people.umass.edu/btrembla/
http://people.umass.edu/btrembla/css/
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.


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


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

Jul 20 '05 #5
Brian wrote:
http://people.umass.edu/btrembla/ (html 4.01/strict)


there is still some space where there ought not be, below and to the
left <a> element in a <li> element.


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

Jul 20 '05 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Skip Hollowell | last post: by
3 posts views Thread by A.Translator | last post: by
1 post views Thread by Sean Howard | last post: by
reply views Thread by andrew.dawes | last post: by
8 posts views Thread by dancer | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.