Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Setting Current/Active Link in Navigation issue
I’m using the following code to set the current/active link on my site main navigation:
<div id=“navline”>
<nav<txp:if_section name=“projects”> class=“active”</txp:if_section>><txp:section link=“1” title=“1” name=“projects” /></nav>
<nav<txp:if_section name=“about”> class=“active”</txp:if_section>><txp:section link=“1” title=“1” name=“about” /></nav>
<nav<txp:if_section name=“archive”> class=“active”</txp:if_section>><txp:section link=“1” title=“1” name=“archive” /></nav>
<nav<txp:if_section name=“contact”> class=“active”</txp:if_section>><txp:section link=“1” title=“1” name=“contact” /></nav>
<nav<txp:if_section name=“store”> class=“active”</txp:if_section>><txp:section link=“1” title=“1” name=“store” /></nav>
</div>
</div>
The code works fine in FireFox and Safari, but fails to function in IE 7.
My Site:
http://thedept.com/index.php?id=5
I would appreciate any suggestions and/or tips.
Best,
Elstrausso
Offline
Re: Setting Current/Active Link in Navigation issue
You have one div that has is missing an opening tag </div></div>
and did you miss the div tags on the nav
elements? IE usually chokes on unopened or unclosed tags, as far as I know.
Offline
Re: Setting Current/Active Link in Navigation issue
<nav>? is that a real tag? never heard of it before, and the w3c validator doesn’t seem to recognize it either….
~~~~~~~~~~~~~| monolinea.com | pixilate.com | istockphoto.com/kemie |~~~~~~~~~~~~~
Offline
Re: Setting Current/Active Link in Navigation issue
Yeah, the <nav> element I think is planned in HTML 5? Maybe Firefox and Safari support it but IE7 doesn’t.
Offline