The Linux Page

Changing the Width or Height affects the other

Problem

I had a problem with my CuteMenu1 module and tried many times to fix it but just could not find the problem with Internet Explorer.

The fact is that I created dropdowns that are supposed to be full width, but that did not work, somehow.

I wanted each item to have a pre-defined height. So in the style for my DIV I wrote this:

	.cutemenu-subitem {
		...
		height: 20px;
		...
	}

Worked beautifully in SeaMonkey and FireFox but somehow in Internet Explorer it would make the list of items look ragedy (i.e. each item would have a different width, seemingly based on the width of the text, I also had a problem with the text that would wrap, it still does wrap, actually, unless I use a nowrap style...)

So the problem is that whenever you define a height in your DIV tag, Internet Explorer marks both sizes, the width and the height, as defined by the user. This probably sets the width to 1px and enlarge as required to the minimum width necessary for the label.

Solution

To fix the problem, I moved the height declaration inside the anchor tag defined within the DIV tag.

<DIV style="..."><A style="height: 20px;">link</A></DIV>

That works in both set of browsers!

You can see the result in the menus at the top of this page. It is a CuteMenu too.

  • 1. This is a drupal module. You happen to have Drupal? Download CuteMenu now then!

Re: is this possible with cute menu???

Hi,

Yes. You can transform the vertical drop down in an horizontal drop down. Although you'll have to change the CSS quite heavily! 8-)

However, I cannot see anything in that sample that could not be done with CuteMenu.

Have fun!
Alexis

is this possible with cute menu???

hey there,
i am trying to make one level drop down menu. i want all the sencondary links to appear horizontally just below the promary links, when we hover over the primary link item. did you get me?? if not visit student.bmj.com, the menu there is what i am talking about....can i make similar menu with cute menu....your help is highly welcome!!!

MO Auto-add terms supports comments now

Yes! I wrote a Drupal 6 module to check for terms automatically and it can now get those found in the comments to index your site. But for that to work properly, I had to add an mo_autoaddterms_comment() function (callback) and these comments are here for me to test the functioning.

Fantastic!!!

But why do you have all these comments on this page?! Hey???

How can I track your comments?

Look below, there are two RSS feeds. One of them is specific to the comments on this page and the other to all comments on the site.

You are welcome to comment about other IE bugs here

I know IE is full of bugs and that's quite annoying. This one was real tricky! Took me forever to find. I'd bet other people knew about such problems, but I could not find anything on the Internet about it.