Перейти к содержимому

Реферальная программа Мегаплана

Выбрать шаблон и создать сайт

Вопрос по CSS

#1 dvf

dvf
  • Пользователь
  • 13 сообщений
  • Репутация: 0
0

Отправлено 06 Январь 2012 - 23:38

На данном сайте взял исходник на Dropdown Menus -> Centered - это zip-архив.
Его содержимое в части CSS:
/* ================================================================ 
This copyright notice must be untouched at all times.

The original version of this stylesheet and the associated (x)html
is available at http://www.cssmenus.co.uk
Copyright (c) 2009- Stu Nicholls. All rights reserved.
This stylesheet and the associated (x)html may be modified in any 
way to fit your requirements.
=================================================================== */
ul#menu {padding:0; list-style:none; background:url(back.gif); text-align:center; margin:0 auto; font-size:11px; font-family:arial, sans-serif; height:41px; width:1000px; position:absolute; left:0; top:139px;}
ul#menu ul {padding:0; margin:0; list-style:none; position:absolute; left:-9999px;}
ul#menu table {border-collapse:collapse; font-size:1em; float:left; margin:-1px;}

ul#menu ul li {float:left; margin:0; text-align:left;}
ul#menu ul li a {display:block; line-height:20px; margin:0; padding:0 10px; background:transparent; width:150px;}

ul#menu li {display:inline; margin:0 -2px; text-align:left;}
ul#menu li a {display:inline-block; height:36px; margin:5px 0 0 0;padding:0 20px 0 0; background:url(button.gif) right top; line-height:30px; text-decoration:none; color:#000;}
ul#menu li a.sub {background:url(button-arrow.gif) right top;}

html>/**/body ul#menu li {display:inline-block; padding:0;}

* html ul#menu li a.sub {margin-right:3px;}
* html ul#menu li a {margin-bottom:-4px;}

ul#menu li a b {display:block; height:36px; float:left; padding:0 0 0 20px; background:url(button.gif) left top; cursor:pointer;}

ul#menu li a:hover {position:relative; background-position:right bottom; color:#fff;}
ul#menu li a:hover b {background-position:left bottom;}

ul#menu li:hover {position:relative;}
ul#menu li:hover > a {background-position:right bottom; color:#fff;}
ul#menu li:hover > a b {background-position:left bottom;}

ul#menu :hover ul {left:1px; width:105px; top:41px;}
* html ul#menu :hover ul {top:36px;}

ul#menu :hover ul li {display:block; float:left; margin:0; border-bottom:1px solid #fff;}
ul#menu :hover ul li a {display:block; float:left; margin:0; height:25px; line-height:25px; width:95px; background:#ddd; color:#000;}
ul#menu :hover ul li a.fly {background:#ddd url(arrow.gif) no-repeat right center;}
ul#menu :hover ul li a:hover {background:#c60; color:#fff;}
ul#menu :hover ul li:hover > a {background:#c60; color:#fff;}

ul#menu :hover ul li a.fly:hover {background:#c60 url(arrow-over.gif) no-repeat right center;}
ul#menu :hover ul li:hover > a.fly {background:#c60 url(arrow-over.gif) no-repeat right center;}

ul#menu :hover ul ul {left:-9999px;}

ul#menu :hover ul :hover ul {left:105px; top:0; width:150px;}

ul#menu :hover ul :hover ul li {display:block; float:left; margin:0; border-bottom:1px solid #fff;}
ul#menu :hover ul :hover ul li a {display:block; float:left; margin:0; height:25px; line-height:25px; background:#bbb; color:#000;}
ul#menu :hover ul :hover ul li a:hover {color:#fff; background:#840;}
и в части HTML:
<ul id="menu">
		<li><a href="index.html"><b>Home</b></a></li>
		<li><a href="single.html"><b>Single Level</b></a></li>
		<li class="current"><a class="sub" href="dropdown.html"><b>Dropdown</b><!--[if gte IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
				<ul class="sub1">
						<li><a class="fly" href="#url">Dropdown one<!--[if gte IE 7]><!--></a><!--<![endif]-->
						<!--[if lte IE 6]><table><tr><td><![endif]-->
								<ul class="fly1">
										<li><a href="#url">Dropdown 1.1</a></li>
										<li><a href="#url">Dropdown 1.2</a></li>
										<li><a href="#url">Dropdown 1.3</a></li>
										<li><a href="#url">Dropdown 1.4</a></li>
										<li><a href="#url">Dropdown 1.5</a></li>
										<li><a href="#url">Dropdown 1.6</a></li>
								</ul>
						<!--[if lte IE 6]></td></tr></table></a><![endif]-
->
						</li>
						<li class="currentsub"><a class="fly" href="#url">Dropdown two<!--[if gte IE 7]><!--></a><!--<![endif]-->
						<!--[if lte IE 6]><table><tr><td><![endif]-->
								<ul class="fly2">
										<li><a href="#url">Dropdown 2.1</a></li>
										<li><a href="#url">Dropdown 2.2</a></li>
										<li class="currentfly"><a href="#url">Dropdown 2.3</a></li>
										<li><a href="#url">Dropdown 2.4</a></li>
										<li><a href="#url">Dropdown 2.5</a></li>
								</ul>
						<!--[if lte IE 6]></td></tr></table></a><![endif]-
->
						</li>
						<li><a href="#url">Dropdown three</a></li>
						<li><a href="#url">Dropdown four</a></li>
						<li><a class="fly" href="#url">Dropdown five<!--[if gte IE 7]><!--></a><!--<![endif]-->
						<!--[if lte IE 6]><table><tr><td><![endif]-->
								<ul class="fly3">
										<li><a href="#url">Dropdown 5.1</a></li>
										<li><a href="#url">Dropdown 2.2</a></li>
										<li><a href="#url">Dropdown 3.3</a></li>
								</ul>
						<!--[if lte IE 6]></td></tr></table></a><![endif]-
->
						</li>
				</ul>
		<!--[if lte IE 6]></td></tr></table></a><![endif]-
->
		</li>
		<li><a class="sub" href="dropline.html"><b>Dropline</b><!--[if gte IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
				<ul class="sub2">
						<li><a href="#url">Dropline one</a></li>
						<li><a href="#url">Dropline two</a></li>
						<li><a href="#url">Dropline three</a></li>
						<li><a href="#url">Dropline four</a></li>
						<li><a href="#url">Dropline five</a></li>
						<li><a href="#url">Dropline six</a></li>
				</ul>
		<!--[if lte IE 6]></td></tr></table></a><![endif]-
->
		</li>
		<li><a class="sub" href="flyout.html"><b>Flyout</b><!--[if gte IE 7]><!--></a><!--<![endif]-->
		<!--[if lte IE 6]><table><tr><td><![endif]-->
				<ul class="sub3">
						<li><a href="#url">Flyout one</a></li>
						<li><a href="#url">Flyout two</a></li>
						<li><a href="#url">Flyout three</a></li>
						<li><a href="#url">Flyout four</a></li>
				</ul>
		<!--[if lte IE 6]></td></tr></table></a><![endif]-
->
		</li>
		<li id="support"><a href="support.html"><b>Support</b></a></li>
		<li id="contact"><a href="contact.html"><b>Contact</b></a></li>
</ul>
Вопрос: как сделать меню третьего уровня?

 

 

  • 0


Оформление форума – IPBSkins.ru