Hi everyone,
My HTML page contains an horizintal, 4 items menu and a red square.
The default display of that red sqaure is “unseen”. You can see that red square
only with mouse hovers the first menu item " aaaa". This is the HTML code:
<!DOCTYPE html>
<html>
<head>
<title>Example</title>
<meta charset='utf-8'>
<link rel="stylesheet" type="text/css" href="css/red_style.css" />
</head>
<body>
<ul>
<li><a id="xxx" href="#">aaaa</a></li>
<li><a href="#">bbbb</a></li>
<li><a href="#">cccc</a></li>
<li><a href="#">dddd</a></li>
</ul>
<div id="xxx">
</body>
</html>
And this is the style page (red_style.css)
html, body, div, span, h1, h2, h3, h4, h5, h6, p, blockquote,a, abbr, acronym, address, big, cite, del,
dfn, em, img, ins, kbd, small, strike, strong, sub, sup, tt, var,b, u, i, center,dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,table, caption, tbody, tfoot, thead, tr, th, td,article, aside, canvas,
details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary,time,
mark, audio, video
{
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
ul {
position:absolute;
list-style-type:none;
border: 1px solid red
}
ul li {
float:right;
border-right:1px solid #9fa9aa;
}
a:hover {color:#2c3e50;font-size:105%;}
li a#xxx:hover #yyy{display:block}
div#yyy {
position: absolute;
width:43.5%;
height:54.5%;
margin: 12% 0% 0% 37%;
background-color:red;
background-repeat: no-repeat;
display:none;
}
My question is: Why doesnt the red square (div#yyy) show up when menu item “aaaa” is hovered?
Thanks a lot !