2x NAV_TABLE_COLUMN on a single page = CSS issue?

Use GitHub to post bug reports and error descriptions for phpwcms. Describe your problem detailed!
Locked
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

2x NAV_TABLE_COLUMN on a single page = CSS issue?

Post by pSouper »

Hi all, it has been a VERY long time since I was posting here last (too long) so Hi to you all.

I have noticed a CSS problem using 2 NAV_TABLE_COLUMNS on thew same page (each addresing a different category level)

the best I can explain is that the 'display: block' doesn't work as expected in IE, FFox or Opera...
eg: css working as expected...
single NAV_TABLE_COLUMN
eg. css not working as expected...
double NAV_TABLE_COLUMN

you should notice that when hovering a menu (most visible when the title wraps over two lines) item in the first example the backgroud fills the block perfectly. BUT on the second example wher ther are two NAV_TABLE_COLUMN's the background only occures behind the letters - very strange.

both NAV_'s are using the same css...

Code: Select all

.nav_table, .nav_table a, .nav_table a:link, .nav_table a:visited, .nav_table a:hover, ul{
	font-family: "Times New Roman", Times, serif;
	font-size: 14px;
	color: #000000;
	background-color:#FFFFFF
    font-weight: normal;
	text-decoration: none;
    text-transform:capitalize;
    border: 0px solid #FFFFFF;
}
.nav_table a:hover, li:hover{
	font-family: "Times New Roman", Times, serif;
    font-size: 14px;
	font-weight: normal;
    text-decoration: none;
    text-transform:capitalize;
    border: 0px solid #FFFFFF;
	background-color: #FF9900;
	color: #000000;
}
.nav_table_active, li:active{
	background-color:FFF3E0;
	color: #FF9900;
}
.nav_table_active a:hover, li:hover{
	font-family: "Times New Roman", Times, serif;
	font-size: 14px;
	font-weight: normal;
	text-decoration: none;
    text-transform:capitalize;
	border: 0px solid #FFFFFF;
	border-bottom:5;
	border-bottom-color:#FF9900;
	background-color: #FFF3E0;
	color: #000000;
	cursor:default;
}
would anyone know if this is a css issue or a NAV_TABLE_COMLUMN issue and if there is a way of fixing this?

thanks in advance, pSouper
Last edited by pSouper on Wed 8. Feb 2006, 08:47, edited 1 time in total.
User avatar
flip-flop
Moderator
Posts: 8178
Joined: Sat 21. May 2005, 21:25
Location: HAMM (Germany)
Contact:

Post by flip-flop »

Hi pSouper,

there is a little error at yout css: background-color:#FFFFFF ;
But I don´t know if this solves your problem.

Gruß Knut
>> HowTo | DOCU | FAQ | TEMPLATES/DOCS << ( SITE )
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

Thanks for spotting that Flip Flop, It may have had some implecations not yet spotted but it has not fixed this issue though... still searching for a fix.

I was wondering if it had something to do with the way display:block determins the 'block' from the ID and that more than one occurance of that ID confuses the browsers. possible?
Last edited by pSouper on Mon 13. Feb 2006, 21:27, edited 1 time in total.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Here's an example of the difference:

Code: Select all

<TR onmouseover="MM_swapImage('linkidQiVt0K','','img/leer.gif',1);this.bgColor='#FF9900';"
style="CURSOR: hand"
onclick="location.href='index.php?id=140,0,0,1,0,0';return false;"
onmouseout="MM_swapImgRestore();this.bgColor='#FFFFFF';"
bgColor=#ffffff>

Code: Select all

<TR onmouseover=""
style="CURSOR: hand"
onclick="location.href='index.php?id=140,0,0,1,0,0';return false;"
onmouseout="">
Action takes place here in "front.func.inc.php":

Code: Select all

//2005-03-28 Oliver Georgi
		//enahced for display also when hidden but within selected tree
		if($struct[$key]["acat_struct"] == $level && $key && (!$struct[$key]["acat_hidden"] || isset($GLOBALS['LEVEL_KEY'][$key])) && !$struct[$key]["acat_regonly"]) {
		
			$link_image_id	= "linkid".randpassword(6);
			$link_name_id 	= ' name="'.$link_image_id.'" id="'.$link_image_id.'"';
						
			if(!$struct[$key]["acat_redirect"]) {
				$link = 'index.php?';
				if($struct[$key]["acat_alias"]) {
					$link .= html_specialchars($struct[$key]["acat_alias"]);
				} else {
					$link .= 'id='.$key.',0,0,1,0,0';
				}
				$redirect['target'] = '';
			} else {
				$redirect = get_redirect_link($struct[$key]["acat_redirect"], ' ', '');
				$link = $redirect['link'];
			}
			
			$js		= ' style="cursor:pointer;cursor:hand;"'; //display:block;
			$js_act = $js;
			if($nav_table_struct["js_over_effects"]) {
			
				if($redirect['target'] != ' target="_blank"') {
					$js .= " onClick=\"location.href='".js_singlequote($link)."';return false;\"";
				} else {
					$js .= " onClick=\"window.open('".js_singlequote($link)."', 'phpwcmnewwin');return false;\"";
				}
				
				$js_act = $js;
				$js .= ' onMouseOver="';
				if($nav_table_struct["linkimage_over_js"]) {
					$js .= "MM_swapImage('".$link_image_id."','','".$nav_table_struct["linkimage_over_js"]."',1);";
				}
				if($nav_table_struct["row_over_bgcolor"]) $js .= "this.bgColor='".$nav_table_struct["row_over_bgcolor"]."';";
				$js .= '" onMouseOut="';
				if($nav_table_struct["linkimage_over_js"]) $js .= "MM_swapImgRestore();";
				if($nav_table_struct["row_norm_bgcolor"]) $js .= "this.bgColor='".$nav_table_struct["row_norm_bgcolor"]."';";
				$js .= '"';
			} else {
				$js = '';
			}
BTW, here's an interesting sidenote:
http://www.phpwcms.de/forum/viewtopic.php?t=9971
User avatar
pSouper
Posts: 1552
Joined: Tue 11. Nov 2003, 15:45
Location: London
Contact:

Post by pSouper »

Thanks for the pointers Dexxus (and hi again - been a while :) )

I am looking through the code now - nothing pops out at the min though: if you or anyone has the cure I would love to hear about it :) until then... i'll keep on plodding on.
User avatar
DeXXus
Posts: 2168
Joined: Fri 28. Nov 2003, 06:20
Location: USA - Florida

Post by DeXXus »

Greetings pSouper :D

I don't know the cause and have no time right now to look deep, but the condition -> if($nav_table_struct["linkimage_over_js"]) <- for these bits of code is not being met:

Code: Select all

            $js .= ' onMouseOver="'; 
            if($nav_table_struct["linkimage_over_js"]) { 
               $js .= "MM_swapImage('".$link_image_id."','','".$nav_table_struct["linkimage_over_js"]."',1);"; 
            } 

Code: Select all

            $js .= '" onMouseOut="'; 
            if($nav_table_struct["linkimage_over_js"]) $js .= "MM_swapImgRestore();"; 
Locked