Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-11-18 06:22:36

elstrausso
Member
Registered: 2008-09-25
Posts: 49
Website

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

#2 2008-11-18 07:36:11

jstubbs
Member
From: Hong Kong
Registered: 2004-12-13
Posts: 2,395
Website

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

#3 2008-11-18 16:22:40

kemie
Plugin Author
From: mexico<-->sweden
Registered: 2004-05-20
Posts: 495
Website

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

#4 2008-11-18 19:59:50

nabrown78
Member
From: Northampton, MA, USA
Registered: 2006-10-04
Posts: 294
Website

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

Board footer

Powered by FluxBB