IE7 Dropdownl problem

Für Fragen und Diskussionen zum Layout und Design, Templates und Stylesheets sowie Themes
Post Reply
Publisher
Forum Members
Forum Members
Posts: 165
Joined: Thu May 20, 2010 8:11 am

IE7 Dropdownl problem

Post by Publisher »

Hallo Zusammen

Das Dropdown erscheint im IE7 nicht unter der Navigationskategorie so wie es sollte, sondern rechts. An was könnte das liegen?
Im Safari, Firefox und IE8 erscheint es darunter. So sollte es auch im IE7 sein.

Link: http://lead-frog.com.tertia.sui-inter.net/

Menu tpl:

Code: Select all

{* CSS classes used in this template:
#menuwrapper - The id for the <div> that the menu is wrapped in. Sets the width, background etc. for the menu.
#primary-nav - The id for the <ul>
.menuparent - The class for each <li> that has children.
.menuactive - The class for each <li> that is active or is a parent (on any level) of a child that is active. *}
{if $count > 0}
<div id="menuwrapper">
<ul id="primary-nav">
{foreach from=$nodelist item=node}
{if $node->depth > $node->prevdepth}
{repeat string='<ul class="unli">' times=$node->depth-$node->prevdepth}
{elseif $node->depth < $node->prevdepth}
{repeat string='</li></ul>' times=$node->prevdepth-$node->depth}
</li>
{elseif $node->index > 0}</li>
{/if}
{if $node->parent == true or ($node->current == true and $node->haschildren == true)}
<li class="{$node->alias}">
<a class="menuactive menuparent" {elseif $node->current == true}
<li class="{$node->alias}">
<a class="menuactive" {elseif $node->haschildren == true}
<li class="{$node->alias}">
<a class="menuparent" {elseif $node->type == 'sectionheader' and $node->haschildren == true}
<li class="sectionheader"><span class="sectionheader">{$node->menutext}</span>{elseif $node->type == 'separator'}
<li style="list-style-type: none;"> <hr class="menu_separator" />{else}
<li class="{$node->alias}">
<a {/if}
{if $node->type != 'sectionheader' and $node->type != 'separator'}
{if $node->target}target="{$node->target}" {/if}
href="{$node->url}"><span>{$node->menutext}</span></a>
{elseif $node->type == 'sectionheader'}
><span class="sectionheader">{$node->menutext}</span></a>
{/if}
{/foreach}
{repeat string='</li></ul>' times=$node->depth-1}
</li>
</ul>
<div class="clearb"></div>
</div>
{/if}

CSS

Code: Select all

/* by Alexander Endresen and mark and Nuno */
#menu_vert {
/* no margin/padding so it fills the whole div */
	margin: 0;
	padding: 40px 0 0 0;
float:right;
width:720px;
}
.clearb {
/* needed for some browsers */
	clear: both;
}
#menuwrapper {
/* set the background color for the menu here */

/* IE6 Hack */
	height: 1%;
	width: auto;

	margin: 0;
	padding: 0;
}
ul#primary-nav, ul#primary-nav ul {
/* remove any default bullets */
	list-style-type: none;
	margin: 0;
	padding: 0;
}
ul#primary-nav {

}
ul#primary-nav ul {
/* make the ul stay in place so when we hover it lets the drops go over the content below else it will push everything below out of the way */
	position: absolute;
/* top being the bottom of the li it comes out of */
	top: auto;
/* keeps it hidden till hover event */
	display: none;
/* same size but different color for each border */
	border-top: 1px solid #C8D3D7;
	border-right: 1px solid #C8D3D7;
	border-bottom: 1px solid #ADC0C7;
	border-left: 1px solid #A5B9C0;
}
ul#primary-nav ul ul {
/* now we move the next level ul down from the top a little for distinction */
	margin-top: 1px;
/* pull it in on the left, helps us not lose the hover effect when going to next level */
	margin-left: -1px;
/* keeps the left side of this ul on the right side of the one it came out of */
	left: 100%;
/* sets the top of it inline with the li it came out of */
	top: 0px;
}
ul#primary-nav li {
/* floating left will set menu items to line up left to right else they will stack top to bottom */
	float: left;
/* no margin/padding keeps them next to each other, the padding will be in the "a" */
	margin: 0px;
	padding: 0px;
}
#primary-nav li li {
/* Set the width of the menu elements at second level. Leaving first level flexible. */
	width: 171px;
/* removes any left margin it may have picked up from the first li */
	margin-left: 0px;
/* keeps them tight to the one above, no missed hovers */
	margin-top: -1px;
/* removes the left float set in first li so these will stack from top down */
	float: none;
/* relative to the ul they are in */
	position: relative;
border: 1px solid black;

}
/* set the "a" link look here */
ul#primary-nav li a {
/* specific font size, this could be larger or smaller than default font size */
	font-size: 1em;
/* make sure we keep the font normal */
	font-weight: bold;
/* set default link colors */
	color: #666666;
/* pushes out from the text, sort of like making links a certain size, if you give them a set width and/or height you may limit you ability to have as much text as you need */
	padding: 8px 15px 8px;
	display: block;
/* sets no underline on links */
	text-decoration: none;
text-transform:uppercase;
width:145px;
text-align:center;
}

ul#primary-nav li a:focus {
outline:none;
}

ul#primary-nav li a:hover {
/* kind of obvious */
	background-color: transparent;
}
ul#primary-nav li li a:hover {
/* this is set to #000, black, below so hover will be white text */
	color: #666666;
}
ul#primary-nav li a.menuactive {
	color: #666666;
/* bold to set it off from non active */
	font-weight: bold;

}

ul#primary-nav li li a.menuactive {
font-weight:normal;
}

ul#primary-nav li a.menuactive span {
border-bottom: 2px solid #a3cb45;
padding:0 0 2px 0;
}

ul#primary-nav li li a.menuactive span {
border-bottom:none;
}
ul#primary-nav li a.menuactive:hover {
	color: #666666;
/* keep it the same */
	
}
#primary-nav li li a.menuparent span {
/* makes it hold a shape */
	display: block;

}
/* gif for IE6, as it can't handle transparent png */
* html #primary-nav li li a.menuparent span {

}
ul#primary-nav li ul a {
/* insures alignment */
	text-align: left;
	margin: 0px;
/* keeps it relative to it's container */
	position: relative;
/* less padding than first level no need for large links here */
	padding: 6px 3px 6px 15px;
/* if first level is set to bold this will reset this level */
	font-weight: normal;
/* first level is #FFF/white, we need black to contrast with light background */
	color: #666666;
	border-top: 0 none;
	border-right: 0 none;
	border-left: 0 none;
text-align:center;
}
ul#primary-nav li ul {
/* very lite grey color, by now you should know what the rest mean */
	background:white;
	margin: 0px;
	padding: 0px;
	position: absolute;
	width: auto;
	height: auto;
	display: none;
	position: absolute;
	z-index: 999;
	border-top: 1px solid #FFFFFF;
	border-bottom: 1px solid #374B51;
	opacity: 1;
}

ul#primary-nav li ul ul {
/*Info: The opacity property is  CSS3, however, will be valid just in CSS 3.1) http://jigsaw.w3.org/css-validator2) More Options chose CSS3 3) is full validate;)*/
	opacity: 95;
/* CSS 3 */
}
/* Styling the appearance of menu items on hover */
#primary-nav li:hover,
#primary-nav li.menuh,
#primary-nav li.menuparenth,
#primary-nav li.menuactiveh {
/* set your image here, dark grey image */
	color: #666666
}
/* The magic - set to work for up to a 3 level menu, but can be increased unlimited, for fourth level add
#primary-nav li:hover ul ul ul,
#primary-nav li.menuparenth ul ul ul,
*/
#primary-nav ul,
#primary-nav li:hover ul,
#primary-nav li:hover ul ul,
#primary-nav li.menuparenth ul,
#primary-nav li.menuparenth ul ul {
	display: none;
}
/* for fourth level add
#primary-nav ul ul ul li:hover ul,
#primary-nav ul ul ul li.menuparenth ul,
*/
#primary-nav li:hover ul,
#primary-nav ul li:hover ul,
#primary-nav ul ul li:hover ul,
#primary-nav li.menuparenth ul,
#primary-nav ul li.menuparenth ul,
#primary-nav ul ul li.menuparenth ul {
	display: block;
}
/* IE6 Hacks */
#primary-nav li li {
	float: left;
	clear: both;
}
#primary-nav li li a {
	height: 1%;
text-transform:none;
color:black !important;
}
.about-us {
border-left: 2px solid black;
border-right:2px solid black;
}
.services, .impact, .contact-us {
border-right:2px solid black;
}
mike-r

Re: IE7 Dropdownl problem

Post by mike-r »

Kann ich hier nicht nachvollziehen.
Möglicherweise spielt Dir der Kompatibilitätsmodus einen Streich. Afair kann man das serverseitig einstellen, dass dieser nicht zur Anwendung kommt.
Dejavu

Re: IE7 Dropdownl problem

Post by Dejavu »

Der Internetexplorer hat allgemein Probleme mit DropDown Menüs. Ich habe dieses Problem einmal mit Conditional Coments gelöst

Code: Select all


<li><a href="1ebene.html">1. Ebene<!--[if IE 7]><!--></a><!--<![endif]-->
<!--[if lte IE 6]><table><tr><td><![endif]-->
                 <ul class="sub">
				<li><a href="2.1">2. Ebene Punkt 1</a></li>
				<li><a href="2.2">2. Ebene Punkt 2</a></li>
				<li><a href="2.3">2. Ebene Punkt 3</a></li>
				<li><a href="2.4">2. Ebene Punkt 4</a></li>
			</ul>
<!--[if lte IE 6]></td></tr></table></a><![endif]-->
</li>

Diesen Workaround habe ich damals glaube ich auf CSS Play o.ä. Seiten gefunden.

P.S. der CSS Befehl opacity: 1; ist überflüßig ;)
mike-r

Re: IE7 Dropdownl problem

Post by mike-r »

Dejavu wrote: Der Internetexplorer hat allgemein Probleme mit DropDown Menüs.
Hier geht's um IE7, nicht 6...
Publisher
Forum Members
Forum Members
Posts: 165
Joined: Thu May 20, 2010 8:11 am

Re: IE7 Dropdownl problem

Post by Publisher »

mike-r wrote: Kann ich hier nicht nachvollziehen.
Möglicherweise spielt Dir der Kompatibilitätsmodus einen Streich. Afair kann man das serverseitig einstellen, dass dieser nicht zur Anwendung kommt.
Im IE Tester IE 7 und an einem PC das nur IE 7 installiert ist sieht es zwar gut aus bei mir. Ich denke der Kompatibilitätsmodus spielt mir wirklich einen streich ;-)
mike-r

Re: IE7 Dropdownl problem

Post by mike-r »

Schau mal hier rein: http://www.thesitewizard.com/webdesign/ ... -ie8.shtml

Dort steht auch die Lösung für die htaccess drin, das gibt allerdings ein neues Problem, im IE8 möchte man bestimmt nicht, dass ein IE7 emuliert wird.

Beste Lösung ist wahrscheinlich das mit conditional comments in die Meta-tags zu schreiben.
Post Reply

Return to “Layout und Design”