「展示」をインデント(さらに右)しようとしましたが、セルのパディングを変更するたびに、子要素間の間隔が同時に変更されます。もう1つの問題は、ホバーで表示されるバーが画面の全幅のままであることを確認したいということです。何かご意見は?
HTML
<body class="bg">
<div>
<nav>
<ul id="mainmenu">
<li id="liServices" class="active"><a href="#" class="maintextcolour">EXHIBITIONS</a>
<ul id="SubMenuY2" class="submenu">
<li><a href="current.html" class="subtextcolour">CURRENT</a></li>
<li><a href="previous2.html" class="subtextcolour">PREVIOUS</a></li>
</ul></li>
</nav>
CSS
@charset "UTF-8";
/* CSS Document */
.bg {
background-attachment:fixed;
background-repeat: no-repeat;
-moz-background-size: cover;
background-size: cover;
background-color:#666;
margin: 0;
}
#mainmenu {
margin: 0;
list-style-type: none;
position: relative;
padding-left:0;
top:100px;
}
#mainmenu li {
clear: left;
position:relative;
}
#mainmenu a {
display: block;
overflow: hidden;
float: left;
width:100%;
position:relative;
opacity: 1;
-webkit-transition: all 0.4s ease-in-out;
padding-left:30px;
line-height: 42px;
}
#mainmenu > li:hover > a {
background-position: 0 0;
background-color:clear;
background-color:rgba(255,255,255,0.5);
width:100%;
\
opacity: 0;
-webkit-transition: none;
}
#mainmenu li.active a {
background-position: 0 0;
background-color:clear;
width:100%;
}
.submenu {
list-style-type: none;
float: left;
display: none;
position:absolute;
left: 80px;
top:0px;
width: auto;
}
#mainmenu li a:hover + .submenu, .submenu:hover {
display:block;
}
.submenu li {
display: inline-block;
clear: none !important;
}
.submenu li a {
float: right;
margin-left: 10px;
}
.maintextcolour {
font-family: LetterGothic, Arial, Helvetica, sans-serif;
font-size: 14px;
color:#FFF;
text-decoration: none;
position: absolute;
padding-top:11px;
cursor: url(cart3.png), auto;
}
.subtextcolour {
font-family: LetterGothic, Arial, Helvetica, sans-serif;
font-size: 14px;
color:#FFF;
text-decoration: none;
padding-top:11px;
cursor: url(cart3.png), auto;
}
.subtextcolour:hover {
font-family: LetterGothic, Arial, Helvetica, sans-serif;
font-size: 14px;
color:#666;
text-decoration: none;
padding-top:11px;
cursor: url(cart3.png), auto;
}