{NAV_ROW}: style links with <div>

Get help with installation and running phpwcms here. Please do not post bug reports or feature requests here.
Post Reply
blutch
Posts: 23
Joined: Tue 8. Mar 2005, 15:20

{NAV_ROW}: style links with <div>

Post by blutch »

Version 1.2.3

Hello there,

I read most of the forum topics on styling the {NAV_ROW}, but I can't make the {NAV_ROW}-links behave seperately from the normal links in {CONTENT}.

In the image below you'll see that the links (1) in {NAV_ROW} behave the same as normal links (2) in {CONTENT}. Namely being white with orange hover. The live version is on http://www.madpro.co.za/site/index.php?home.

Image

Now comes the problem. The {NAV_ROW} is inside a DIV : <div id="btnsMain" class="linkMain"></div>.

My stylesheet looks now as follows:

Code: Select all

a:link, a:visited, a:active, a:focus {
	color: #012647;
	text-decoration: underline;
}
a:hover {
	color: #FF3300;
	text-decoration: none;
}

.linkMain a:link, a:visited, a:active, a:focus {
 color: #FFFFFF;
 font-size: 11px;
 font-weight:bold;
 text-decoration:none;
}

.linkMain a:hover {
 color: #FF3300;
}
Apparently, the .linkMain class overrules the normal links at this moment. Also attaching the class to a nested div inside btnsMain won't work. I would appreciate any help on this matter.

Reinoud[/i]
Ben
Posts: 558
Joined: Wed 14. Jan 2004, 08:05
Location: Atlanta
Contact:

Post by Ben »

In /config/phpwcms/conf.template_default.inc, edit lines 14 - 17 to look like this:

Code: Select all

$template_default["nav_row"]["link_before"]			= '<span class="linkMain">';
$template_default["nav_row"]["link_after"]			= '</span>';
$template_default["nav_row"]["link_before_active"]	= '<span class="linkMainActive">';
$template_default["nav_row"]["link_after_active"]	= '</span>';
Hopefully this will work for you - I've used it in the past and from what I remember, it will override the default link colors. I would actually recommend using {NAV_LIST_TOP} instead, as {NAV_ROW} will actually show navigation items that you hide.
Post Reply