Revisions
- September 25, 2012 @ 02:14:53 [Current Revision] by PeterLugg
- September 25, 2012 @ 02:13:17 by PeterLugg
- September 25, 2012 @ 02:11:57 by PeterLugg
Revision Differences
September 25, 2012 @ 02:13:17 | Current Revision | ||
---|---|---|---|
Content | |||
Deleted: This | Added: This is bullet proof down to IE7- Yea! | ||
Added: As used by WooThemes for their great work - check out this <a href="http:// jsfiddle.net/ jameskoster/qSXdm/2/" target="_blank">JS Fiddle</a>. | |||
Added: <iframe style="width: 100%; height: 300px;" src="http://jsfiddle.net/ jameskoster/qSXdm/ 2/embedded/" frameborder="0" width="320" height="240"></iframe> | |||
Unchanged: [html]<ul class= "menu"> | Unchanged: [html]<ul class= "menu"> | ||
Unchanged: <li class= "parent">< a href="#"> Parent</a> | Unchanged: <li class= "parent">< a href="#"> Parent</a> | ||
Unchanged: <ul> | Unchanged: <ul> | ||
Unchanged: <li>< a href="#"> Child</a></li> | Unchanged: <li>< a href="#"> Child</a></li> | ||
Unchanged: <li class= "parent">< a href="#"> Link</a> | Unchanged: <li class= "parent">< a href="#"> Link</a> | ||
Unchanged: <ul> | Unchanged: <ul> | ||
Unchanged: <li>< a href=" #">Grand Child</a></li> | Unchanged: <li>< a href=" #">Grand Child</a></li> | ||
Unchanged: <li class= "parent">< a href="#"> Link</a> | Unchanged: <li class= "parent">< a href="#"> Link</a> | ||
Unchanged: <ul> | Unchanged: <ul> | ||
Unchanged: <li>< a href=" #">Great Grand Child</a></li> | Unchanged: <li>< a href=" #">Great Grand Child</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li class= "parent">< a href="#"> Link</a> | Unchanged: <li class= "parent">< a href="#"> Link</a> | ||
Unchanged: <ul> | Unchanged: <ul> | ||
Unchanged: <li>< a href=" #">Great Great Grand Child</a></li> | Unchanged: <li>< a href=" #">Great Great Grand Child</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li class= "parent">< a href="#"> Link</a> | Unchanged: <li class= "parent">< a href="#"> Link</a> | ||
Unchanged: <ul> | Unchanged: <ul> | ||
Unchanged: <li>< a href=" #">Great Great Great Grand Child</a></li> | Unchanged: <li>< a href=" #">Great Great Great Grand Child</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: </ul> | Unchanged: </ul> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: </ul> | Unchanged: </ul> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: </ul> | Unchanged: </ul> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: </ul> | Unchanged: </ul> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: </ul> | Unchanged: </ul> | ||
Unchanged: </li> | Unchanged: </li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: <li>< a href="#"> Link</a></li> | Unchanged: <li>< a href="#"> Link</a></li> | ||
Unchanged: </ul>[/html] | Unchanged: </ul>[/html] | ||
Unchanged: Just use this css: | Unchanged: Just use this css: | ||
Unchanged: [css]ul.menu { | Unchanged: [css]ul.menu { | ||
Unchanged: position: relative; | Unchanged: position: relative; | ||
Unchanged: margin-bottom:0; | Unchanged: margin-bottom:0; | ||
Unchanged: li { | Unchanged: li { | ||
Unchanged: position: relative; | Unchanged: position: relative; | ||
Unchanged: float: left; | Unchanged: float: left; | ||
Unchanged: zoom:1; | Unchanged: zoom:1; | ||
Unchanged: list-style: none; | Unchanged: list-style: none; | ||
Unchanged: a { | Unchanged: a { | ||
Unchanged: display: block; | Unchanged: display: block; | ||
Unchanged: padding:.382em 1em; | Unchanged: padding:.382em 1em; | ||
Unchanged: background:#eee; | Unchanged: background:#eee; | ||
Unchanged: -webkit-box-sizing: border-box; | Unchanged: -webkit-box-sizing: border-box; | ||
Unchanged: -moz-box-sizing: border-box; | Unchanged: -moz-box-sizing: border-box; | ||
Unchanged: box-sizing: border-box; | Unchanged: box-sizing: border-box; | ||
Unchanged: } | Unchanged: } | ||
Unchanged: &.parent { / / Styles applied to all parent list items | Unchanged: &.parent { / / Styles applied to all parent list items | ||
Unchanged: > a:after { | Unchanged: > a:after { | ||
Unchanged: content:" \2193"; | Unchanged: content:" \2193"; | ||
Unchanged: line-height:1; | Unchanged: line-height:1; | ||
Unchanged: margin-left:1em; | Unchanged: margin-left:1em; | ||
Unchanged: float:right; | Unchanged: float:right; | ||
Unchanged: } | Unchanged: } | ||
Unchanged: } | Unchanged: } | ||
Unchanged: } | Unchanged: } | ||
Unchanged: /* CHILDREN */ | Unchanged: /* CHILDREN */ | ||
Unchanged: ul { | Unchanged: ul { | ||
Unchanged: width:10em; | Unchanged: width:10em; | ||
Unchanged: visibility: hidden; // Optionally use display: none to avoid horizontal scrollbars | Unchanged: visibility: hidden; // Optionally use display: none to avoid horizontal scrollbars | ||
Unchanged: position: absolute; | Unchanged: position: absolute; | ||
Unchanged: top:100%; | Unchanged: top:100%; | ||
Unchanged: left: 0; | Unchanged: left: 0; | ||
Unchanged: z-index: 9999; | Unchanged: z-index: 9999; | ||
Unchanged: margin:0; | Unchanged: margin:0; | ||
Unchanged: li { | Unchanged: li { | ||
Unchanged: float: none; | Unchanged: float: none; | ||
Unchanged: a { | Unchanged: a { | ||
Unchanged: width: 100%; | Unchanged: width: 100%; | ||
Unchanged: display: inline-block; | Unchanged: display: inline-block; | ||
Unchanged: } | Unchanged: } | ||
Unchanged: &.parent { | Unchanged: &.parent { | ||
Unchanged: > a:after { | Unchanged: > a:after { | ||
Unchanged: content:" \2192"; | Unchanged: content:" \2192"; | ||
Unchanged: } | Unchanged: } | ||
Unchanged: } | Unchanged: } | ||
Unchanged: } | Unchanged: } | ||
Unchanged: } | Unchanged: } | ||
Unchanged: ul ul { | Unchanged: ul ul { | ||
Unchanged: left:100%; | Unchanged: left:100%; | ||
Unchanged: top:0; | Unchanged: top:0; | ||
Unchanged: } | Unchanged: } | ||
Unchanged: li:hover > ul { | Unchanged: li:hover > ul { | ||
Unchanged: visibility: visible; | Unchanged: visibility: visible; | ||
Unchanged: } | Unchanged: } | ||
Unchanged: }[/css] | Unchanged: }[/css] |
Note: Spaces may be added to comparison text to allow better line wrapping.
No comments yet.