Extra Space created by Menu - PLS help!

Having problems with DHTML Menu? There is usually somebody here who knows the answer.
Post Reply
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Extra Space created by Menu - PLS help!

Post by tepidarium »

Hi All,

Ok here's the situation:

In Netscape 6.1 (on windows - don't have mac to test) my table bound milonic menu creates an extra space above the table in which it is contained. This ruins my design. Here's the caveat -this only happens if the DTD is declared as XHTML. With no DTD decleration the menu does not create the extra space. Is there a solution to this? :| :|

Here are the URLS -

XHTML (with space between banner table and menu table) - http://www.citytech.cuny.edu/post/test/top.shtml

HTML (no DTD, no space) -
http://www.citytech.cuny.edu/post/test/top2.shtml

I have already tried to combine the banner into a row above the menu but the space is still present. Does this mean there is a slight postioning bug with using the menu with xhtml! ?

HELP! TY!
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

Hey Tep -

No idea if this will help, but I write my XHTML DTD as follows...

Code: Select all

<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
Note the additional line at the top.

Sorry I don't have an old NS to look at it.
John
mfindlay
Super Advanced
Super Advanced
Posts: 38
Joined: Mon Jun 28, 2004 5:00 pm

Post by mfindlay »

I have the same problem on MAC NS 6.

The problem is 2-fold actually;
1) td cells that contain images but no text have gaps placed in them by NS6 Mac. The issue has to do with Mac NS leaving space for the descender on the non-existent text. This is the initial cause of the gaps. To solve that problem, I created 2 styles that set the line-height to zero percent and assign them to the rows and tds containing the images:

Code: Select all

td#notext
{
 line-height:0%;
}
.trnotext
{
 line-height:0%;
}
Then in the source code:

Code: Select all

                <tr class="trnotext"> 
                    <td id="notext" colspan="2" align="left" valign="top"><img src="graphics/home/toppiece.gif" alt="" width="217" height="107" /></td> 
All this solved the problem - until

2) I introduced the Milonic menus to the page. As soon as I inserted the call to drawMenus(), the gap re-appeared on Netscape 6 on MAC.

So the question is: what is it about the Milonic code and drawMenus() that disrupts the styles/formatting etc?

Any help is greatly appreciated :)
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I have Netscape 6.1 and tested John's code, it didn't change anything. However, the space is at the bottom of the table with the banner.gif, so I tried mfindlay's code in the head of the page

Code: Select all

<style type="text/css">
td#notext 
{ 
 line-height:0%; 
} 
.trnotext 
{ 
 line-height:0%; 
}
</style>
and then did the tr and td coding as posted here in that banner table, and that got rid of the space....... You should upgrade to 5.33 [don't forget to save your old files until you're sure there are no problems.

Ruth
mfindlay
Super Advanced
Super Advanced
Posts: 38
Joined: Mon Jun 28, 2004 5:00 pm

Post by mfindlay »

I upgraded from 5.32 to 5.33 and it seems about 90% fixed now.

The only problem seems to be the first entry into the page. About half of the time the page is first entered (really, the one that counts) the line appears, but upon doing a refresh the problem line always goes away.

Could it be a timing issue with the loading of the page in NS 6 on Mac?

You can see an example of this on the home page at: http://www.caseygrants.org/newsite/
User avatar
Ruth
 Team
 Team
Posts: 8763
Joined: Thu May 15, 2003 5:02 am
Location: Yucaipa, CA
Contact:

Post by Ruth »

I'm sorry, mfindlay, I could only test on a pc, don't have a mac, but using your style coding fixed the problem in NS on a pc.

Ruth
tepidarium
Mega User
Mega User
Posts: 169
Joined: Sun Oct 05, 2003 4:21 am

Post by tepidarium »

mfindlay & RUth - thanks for your replies. I will try the CSS you inserted.

I am hesitant to upgrade to v. 5.33 of the menu because of the menu width issue that I have found in the new verson - see my post at:

http://milonic.com/forum/viewtopic.php?t=4561
User avatar
John
 Team
 Team
Posts: 5967
Joined: Sun May 19, 2002 8:23 pm
Location: Phoenix, AZ
Contact:

Post by John »

mf, if it is a timing issue you can try moving the menu calls. We usually recommend the first item in the body or in the head, but in some situations folks have found placing the calls at the very end of the page worked.
John
Post Reply