Page 2 of 9
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Thu Jul 21, 2005 3:03 am
by Greg
WOW! this is really looking great! Tested in Firefox 1.06 and IE 6 very fast ... PHPlayers days are numbered !!
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Thu Jul 21, 2005 4:05 am
by ljbadenz
Greg wrote:
Really getting close. I find the JS isn't working in IE, however if I add "body {behavior:url(csshover.htc);}" to the CSS and add the csshover.htc file to the root folder IE works fine. This is the file I sent you wishy, not sure if you shared it with ljbadenz.
This is an IE only style tag. It will not be valid CSS according to the W3C's validator!
The JS in the zip should work OK, if IE7 supports the :hover pseudo-class, then we can say good bye to JS menus
FOREVER!!!
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Thu Jul 21, 2005 4:31 am
by ljbadenz
New version!!! 1.1.1
Update now!
I added the IE6 flicker fix as documented at
http://www.nickrigby.com/article/25/dro ... style-pt-3 under comments #19
Jesus wrote:
Almost a month ago Nick Rigby wrote that he would update to remove the flicker. For those that just copy paste the code and have no idea whatsoever on how to remove it, the page Nick posted has a very very simple fix. Loading the image with overordered element (understandable?). Anyway this how to fix it:
code #primary-nav ul, ul#primary-nav li.menuparent { background: transparent url(arrow.gif) right center no-repeat; }
/* fixed image flicker by adding ’#primary-nav ul */ code
If anyone has questions concerning this fix, just visit the page Nick posted further up.
btw, hope I got these weird tags proper
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Thu Jul 21, 2005 6:55 am
by ljbadenz
I found an error in 1.1.1, the arrow wasn't showing up.
Redownload the zip for the fix.
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Thu Jul 21, 2005 10:52 am
by Redguy
WOW! I'm very impressed with the CSSMenu... great work... now how hard would it be to add the horizontal function?
I would like to see this menu replacing the PHPLayers! What does wishy think of that? is this the future to come?
one thing though, in the clean Win2k install you get IE5.00 and the CSSMenu submenu does not work locally on my computer in the browser,
but works smooth at your test side
www.ibbs.co.nz/cmsmadesimple, is something different there? I wan't maximum browser support:P
Keep up the good work!!!
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Thu Jul 21, 2005 11:09 am
by megabob3
Really nice JOB!!!

Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Thu Jul 21, 2005 12:26 pm
by Ted
The idea is to totally replace phplayers. So, yes, a horizontal function will be necessary before it can be the new default. It's also going to require some tweaking so that it's easily overridden with stylesheets in the CMSMS admin. But this is a great start.
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 1:03 am
by ljbadenz
Redguy wrote:
WOW! I'm very impressed with the CSSMenu... great work... now how hard would it be to add the horizontal function?
It wouldn't be that hard, I tried to make a horizontal stylesheet, but some things I couldn't get to work. I think I will try to work on that some more.
Then the next step is to use getoptions() in the stylesheet functiion to select between the vertical and horizontal stylesheet.
The only problem then is that you can't have both a vertical and a horizontal menu on the same page. But if I used php to dynamically select an id tag for each menu, (random number, or maybe an id option) and then create a dynamic stylesheet for that id. (I could read the stylesheet then use regex to replace th #primary-nav with #custom-id.)
I also looked at using onfocus and onblur for keyboard access the the W3's DOM specs say they only work on form elements and not on links.
one thing though, in the clean Win2k install you get IE5.00 and the CSSMenu submenu does not work locally on my computer in the browser,
but works smooth at your test side
www.ibbs.co.nz/cmsmadesimple, is something different there? I wan't maximum browser support:P
The only thing different on my server is the stylesheet, I made the menu slightly narrower to fit, and change the text colour to black.
Try looking at the articles I mentioned above and tell me if the example menus work. If they work I'll try to see what is different.
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 1:19 am
by Ted
It's not working right for me. Not sure where the bug is.
It's something to do with the strripos part. Resulting code looks like:
Code: Select all
<li class="menuparent"> id="listmenu">
<ul id="primary-nav">
<li class="menuparent"><a href="http://barkley.local/cms/index.php?page=cms-install-successful-" class="currentpage">Home Page</a>
<ul>
<li class="sectionheader"><a href="#">FAQ</a>
<ul>
<li><a href="http://barkley.local/cms/index.php?page=contact-us">Contact Us</a>
</li>
</ul>
</li>
<li class="separator"><a href="#"></a></li>
<li><a href="http://barkley.local/cms/index.php?page=svn-cvs-">SVN (cvs)</a>
</li>
</ul>
</li>
<li><a href="http://barkley.local/cms/index.php?page=Uploads">Uploads</a></li>
<li><a href="http://barkley.local/cms/index.php?page=Test">Test</a></li></ul></div>
</div>
It's replacing the top div with an li for some reason... I'm trying to figure it out, but it's taking longer than I thought.
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 1:28 am
by Ted
Found it.
Code: Select all
$tmppos = strripos($menu, "<li>");
if ($tmppos !== FALSE)
{
$menu = substr_replace($menu, '<li class="menuparent">', $tmppos, 4);
}
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 3:12 am
by ljbadenz
Fixed it.
As a amateur C++ programmer, I can't believe I missed such a simple runtime error.
You should always check return values for the unexpected!
Now if only MS programmers did this, then maybe there would be a 5MB patch once a month.
Mind you that was a bit of a hack, as I couldn't figure out how to check if the next iteration was going to be a submenu, so I did a lazy trick of going back to the last tag when there was a .
So update your code now!
Thats still quite weird as it doesnt happedn on my site. Hmm...
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 3:13 am
by Ted
Well, I spent the evening trying to make a horizontal menu that uses the same html layout. No go. I suck at CSS and should've not bothered.
If someone wants to modify the vertical one and make it work horizontal, I'll be most indebted. :)
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 3:35 am
by ljbadenz
I'll see if I can make a working horizontal stylesheet.
But it may take a while.
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 4:05 am
by ljbadenz
I updated the main post to include more info.
And I renamed the zip file to indicate the version.
And I reversion it 1.1.3 to indicate the 2 patches so far.
Re: CSSMenu: The ultimate CSS only PHPLayers replacement!
Posted: Fri Jul 22, 2005 10:20 am
by Redguy
ljbadenz wrote:
one thing though, in the clean Win2k install you get IE5.00 and the CSSMenu submenu does not work locally on my computer in the browser,
but works smooth at your test side
www.ibbs.co.nz/cmsmadesimple, is something different there? I wan't maximum browser support:P
The only thing different on my server is the stylesheet, I made the menu slightly narrower to fit, and change the text colour to black.
Try looking at the articles I mentioned above and tell me if the example menus work. If they work I'll try to see what is different.
The IE javascript fix wasn't loading locally on my computer, that was the problem, sorry for the misjudgement:P
I just can't stop looking at the CSSMenu. It's working so smooth on all browsers.
Maybe I should try to help you get the horizontal function working, I'll let you know!!
[shadow=red,left]keep it up brothers[/shadow]