I am facing a little problem with a in html and css.I want to create a menu in a top left corner of the page, but my div won't dipslay.Would be grateful for any solutions. HTML
<div class = "topMenu">
<div id = "search"></div>
<div id = "register"></div>
CSS
body {
background:url('image.jpg') no-repeat;
-moz-background-size:cover;
-webkit-background-size:cover;
-o-background-size:cover;
background-size:cover;
background-color:black;
}
#topMenu{
position:absolute;
width:70px;
float:right;
background-color:red;
}
See this demo: http://jsfiddle.net/TRp3A/
There #topMenu
is changed to .topMenu
in css, otherwise class will not be applied to corresponding div. And I've added there height just to make div visible as there is no content and it is 0 height by default.
.topMenu{
position:absolute;
width:70px;
float:right;
background-color:red;
height:40px;
}