[Resolved] Dropdown navigation with sliding doors
Something looks off in the str_replace’s to me, i could be wrong, but try this instead…
<?php $tpages = wp_list_pages('title_li=&echo=0'); $tpages = str_replace('<a href=','<span><a href=',$tpages); $tpages = str_replace('</a>','</a></span>',$tpages); echo $tpages; ?>
The span should be placed before the link element (for validation purposes).
The way you have it currently can be archieved with any str_replace… like so…
<?php wp_list_pages('title_li=&link_before=<span>&link_after=</span>'); ?>
Invalidations aside, the str_replace code i’ve given you shouldn’t exhibit the problem you mentioned… we can tweak it if it does though… 🙂 .. try it out!… 😉
Haha, you know what after I spent about 3 hours on this last night, I went to bed, got up this morning and thought…what if I move the span outside the href! That’s freaky!
As far as I am aware as I have used it before having a span inside an a href is perfectly valid, but your right it what you suggested could certainly fix my problem, even if it does not remove the span from the child element, it will def solve the hover pseudo issue in IE6. Will give it a whirl tonight and post up if it has worked! Thanks for your response t31os_!
I think your previous code will match mroe cases, so you end with extra replacements where you don’t want them, that’s why i was a little more explicit with the ones provided above..
The last response was suppose to read that your previous approach could be done without str_replace…
Regardings the spans, i think you may be right, because span is another inline element, the invalidations arrive when you place block level elements inside inline elements…(not vice versa – that’s valid)
Get stuck again, post back… 😉
Hi, so I though I would post a response to say the majority of this issue has been resolved with the thanks of t31os_.
The code posted successfully altered the span to outside the a href element, therefore relieving the bug in IE6 hover. Not figured out the issue with the specific class link on the footer of the sub nav…but guess thats for another day 🙂 another happy customer.
Wow, i read back my own posts and it’s in part jibberish, lol…. blame the late nights…
Glad you got there in the end…
If you can show me the complete code (as is) as you use it i might be able to help with the remaining issue…
- The topic ‘[Resolved] Dropdown navigation with sliding doors’ is closed to new replies.