| Author | Messages | |
Mark Townsend
 Posts:26

| | 04/18/2008 6:52 PM |
| I am trying to create my first suckerfish type menu. I have figured out most of the styling issues with a lot of trial and error. However, I still have one technical problem. When I select a root level menu item, the vertical child menu starts too far to the right, so I can not get to it. It will always close before I reach the items. eg. Menu1 Menu2 Menu3
Menu1.1
Menu1.2 I have attached my css file in the hope someone can explain what I am doing wrong. Thanks |
Attachment: 141919454671.zip
| | |
| |
| Mark Townsend
 Posts:26

| | 04/19/2008 10:24 PM |
| I have noticed some other strange behavour with regard to this menu in different browsers. In IE7, I get the symptoms above, where the verticsl child menuis offset from its parent, hence unable to be selcted. In Firefox the white box that should contain the child menu items is below the parent like I would expect, however the actual menu items are still offest to the right. This is all very confusing for me, I would appreciate any advice you can give. Thanks | | | |
| John Mitchell Posts:3033


| | 04/20/2008 10:19 AM |
| Hi Mark, The difference between IE and FireFox will be what is referred to as the "BoxModel" in IE. IE does padding and margins different. You'll notice that in the sample suckerfish menu there is some weird css for width like this w\idth: 3.5em; (notice the slash in the name) this is a hack to let IE use that width and mozilla browsers will ignore it. I'm not sure why you have position:static in your CSS, but that may be the problem. #nav li:hover, #nav li.hover {
background: White;
position:static;
} My best advice would be to use the sample template and the move slowly away from that base while making your modifications so that you can see what each modification does. For a complete explanation of why, what, & how also visit : http://www.htmldog.com/articles/suckerfish/dropdowns/ | | | |
| Mark Townsend
 Posts:26

| | 04/20/2008 9:05 PM |
| Hi John,
Thanks for the feedback. The weird stuff w\id... i removed those lines as I thought they were a misstype, will put them back,
The position:static was added based on feedback I found on the net to overcome another known issue regarding i.e 7 and firefos.
The way I created this css was to start with your sample one, then change one item at a time. But I can't seem to find the one which changes the location on the childmenu box. The one that seems to have the effect is the one marked "auto", if I change this to a fixed position, it goes to the fixed position, but obviously I can' change this to a fixed position as it needs to be relative to the parent, and I can;t see how that is done.
I visited the website you suggest, but still coule not find an answer there, that is why I was hoping one of you readers have come across this problem before and know how to fix it.
Many thanks for your help.
Regards
Mark
| | | |
| Mark Townsend
 Posts:26

| | 04/21/2008 2:58 AM |
| Hi John, I have now resolved the issue of the submenu being out of place. I have now discovered another problem. This time I can get my cursor to the first item in the 1st submenu, but cannot get beyond that, the submenu closes if I try to move my mouse either to the next levelof submenu, or to the second or third item on the submenu. I posted the created UL list from your control, along with my stylesheet to Experts Exchange for some advice, someone there noticed there is a closing /LI missing on the second level menu. I have attached a text document with the source code from one of my pages. I have checked the template, copy attached also, and all the /IL seem to be present. Can you offer any suggections why the /IL is missing. Thanks |
Attachment: 142159496854.txt
Attachment: 142159498458.txt
| | |
| John Mitchell Posts:3033


| | 04/21/2008 7:42 AM |
| A missing LI may be a bug that was corrected in the current release. I have attached the latest DLL to this post. If you put that in the /bin folder it may help. | | | |
| Mark Townsend
 Posts:26

| | 04/21/2008 1:11 PM |
| Will give it a try and get back to you.
Thanks
Mark | | | |
| Mark Townsend
 Posts:26

| | 04/23/2008 11:51 PM |
| I have tried the suckerfish menu, and the new cssplay menus, on my site. By putting them into an shared UserControl, I seem to have stopped the problem with the float:left.
My menu now works great in Firefox, but has a problem in IE7. In IE7 I can use the horizontal menu, and the first level vertical menu, but for the second level vertical menu, it depends on the second level item. It seems to be related to how much space is between the end of the words, and the end of the box, i.e. If the menu item has a long name, I can get the the 3rd level menu, because the words end close to the border. However, if the 2nd level is short, and has a long above or below it, so there is a large space between the words and the border, the menu closes before I can get to the 3rd level menu. I am pressuming this is caused by the well documented whitespace problem? As I said, this only occurs on IE7 and IE6, FF works fine.
Thanks
Mark | | | |
| John Mitchell Posts:3033


| | 04/24/2008 7:15 AM |
| The reason it works different on IE than on FF is because of IE's Box Model. You have to adjust the positions so they work in both. Yes, cross-browser issues are well documented. If you want to attach your skin, I'll make the adjustments. | | | |
| Mark Townsend
 Posts:26

| | 04/24/2008 10:25 PM |
| Hi, Thanks for the offer of help. I fully realise I am a P.I.T.A., and for this I apologise. I have cleaned up my skin, and taken in all the things you have said. And I think I am now about 95% of the way there. I have working menus in both IE7 and FF, but still some differences in their appearances. If you have time would you mind to take a look, and tell me what I am doing wrong. Again thanks for your help. |
Attachment: 142425817771.zip
| | |
| John Mitchell Posts:3033


| | 04/24/2008 11:12 PM |
| Hi Mark, No need to apologize.
Thanks for giving me the chance to work out the differences. I don't know if I can make it any better since cross-browser rendering differences are very common, but I'll try. | | | |
| John Mitchell Posts:3033


| | 04/25/2008 12:43 PM |
| Mark,
As I look at this with both FireFox and IE they look almost exactly the same to me.
The only difference is that FF has the sub-menus just a little closer to their parent, but both work and look fine.
I have attached a couple screen shots. Are you seeing something different? |


| | |
| Mark Townsend
 Posts:26

| | 04/25/2008 11:01 PM |
| The main difference I have is in IE7, the Level 0 menus do not turn blue, when the mouse is over them, they always stay white, and as can be seen in yours the darkblue menu band is much deeper in the IE7 version, i.e. twice its correct height of 30px. The other stuff I pretty much worked out thanks to the assistance you already supplied.
Thanks
Mark | | | |
| John Mitchell Posts:3033


| | 04/26/2008 8:58 AM |
| Ahh, I see now. The top CSS rule for the IE part should be changed to this (add the :hover psuedo-class): .menu ul li.hover a:hover {color:#fff; background:#36f;text-decoration:none;} And the nbsp; you have between the main nav and the adminhostlist menu is what is causing that extra height in IE. You can use padding instead of the non-breaking space to get rid of that. | | | |
| Mark Townsend
 Posts:26

| | 04/26/2008 7:23 PM |
| Hi John,
Thanks for the advice. I now seem to have a working menu. The hover psuedo-class worked a treat,.
I tried removing the  , and it did remove the second line, but when I logged in the admin menu still wanted to appear on the second line, no matter how wide I made the frame. So I placed the admin menu in a second div, with the same style class as the first div, and it worked as I wanted.
As you can probably tell, this is my first real attempt at using CSS. 95% of my development work is on winforms app, the other 5% is on Classic ASP (pre CSS). I can tell you we never have any of these problems in those environments.
Again, thanks for all you help.
Best regards
Mark | | | |
| Host Account
 Posts:83


| | 04/26/2008 7:42 PM |
| Yes, I know what you mean. CSS can be a real pain, especially across browsers. But it can also come in really handy so I can't give it too bad a rap. I'm glad you got it all working. | | | |
|
|