I am trying to position some text/pictures using position relative, however when using relative, it creates a scroll bar eventhough the content is not over there. Is there a way to not have it do this other than overflow:hidden?
the css for the object is
body {background-image:url('../images/logo1.jpg');
background-repeat:no-repeat;
background-size: cover;
}
body {color:black;}
a, a:visited {
color:white;
text-decoration:none;
}
div#header {
font-size:280%;
float:right;
text-decoration:underline;
}
#nav {
margin:0;
padding:0;
background:#808259 url(nav_bg.jpg) 0 0 repeat-x;
width:100%;
border:1px solid #42432d;
border-width:1px 0;
position:absolute;
top:100px;
left:0px;
font-size:175%;
}
#nav li {
display:inline;
padding:0;
margin:0;
}
#nav a:link,
#nav a:visited {
color:#000;
background:#b2b580;
padding:20px 40px 4px 10px;
float:left;
width:auto;
border-right:1px solid #42432d;
text-decoration:none;
font:bold 1em/1em Arial, Helvetica, sans-serif;
text-transform:uppercase;
text-shadow: 2px 2px 2px #555;
}
#nav a:hover,
#nav a:focus {
color:#fff;
background:#727454;
}
#nav li:first-child a {
border-left:1px solid #42432d;
}
#home #nav-home a,
#about #nav-about a,
#archive #nav-archive a,
#lab #nav-lab a,
#reviews #nav-reviews a,
#contact #nav-contact a {
background:#e35a00;
color:#fff;
text-shadow:none;
}
#home #nav-home a:hover,
#about #nav-about a:hover,
#archive #nav-archive a:hover,
#lab #nav-lab a:hover,
#reviews #nav-reviews a:hover,
#contact #nav-contact a:hover {
background:#e35a00;
}
#nav a:active {
background:#e35a00;
color:#fff;
font-size:150%;
}
div.logo
img {
position:absolute;
left:0;
top:0;
}
div#support {
text-align:center;
font-size:250%;
color:#CC3300;
position:relative;
top:90px;
left:34%;
text-decoration:underline;
font-weight:bold;
}
div#photo
img{
margin-top:7%;
margin-left:30%;
}
p#follow {
position:relative;
left:50%;
top:-40px;
font-size:250%;
color:white;
text-decoration:underline;
font-weight:bold;
margin-top:5
}
div#facebook
img{
position:relative;
left:50%;
top:-40px;
}
div#sitemap {
font-size:200%;
text-decoration:underline;
font-weight:bold;
color:white;
position:relative;
left:600px;
top:-200px;
}
ul#site {
font-size:175%;
margin-top:-10%;
margin-left: 33%;
padding-left: 0;
color:white;
}
#media (min-width : 1300px)
and (max-width : 1400px) {
div#support {
text-align:center;
font-size:150%;
color:#CC3300;
position:relative;
top:90px;
left:60%;
text-decoration:underline;
font-weight:bold;
width:40%;
}
div#photo {
margin-top:3%;
height:50%;
width:50%;
}
div#sitemap {
font-size:200%;
text-decoration:underline;
font-weight:bold;
color:white;
position:relative;
left:400px;
top:-200px;
}
div#facebook
img{
position:relative;
left:50%;
top:-50px;
}
ul#site {
font-size:175%;
margin-top:-13%;
margin-left: 33%;
color:white;
}
If you are trying to position text, it likely has a 100% width (as block elements do). You may not be able to see it, but there is a good chance that by putting left: 800px; on your element, it is pushing its bounds out, past the edge of the screen.
This does not happen when using absolute positioning as it basically tells everything to ignore the space that the element takes up.
You could try making sure all of the elements you are positioning are set to either display: inline; or display: inline-block;, and/or setting a width on the element that you know will keep it contained to the width of the screen.
Related
I have a small but annoying issue here. My footer and background image stay with the page when on different resolutions or zoomed in and out (because of the footer being fixed and the background image being positioned in the center) but my other images don't seem to stay with the page, they move on their own given a change in different resolutions or if I zoom in and out. Here's my code/screenshots of what's happening:
Screenshots:
My view of the webpage (1920x1080): http://gyazo.com/11c8a55c697696eb7667fdf23f903bb9
Here is my code pen: http://codepen.io/anon/pen/JobwRB
Try scroll zooming in codepen and I'll think you'll see what I mean. Is media queries worth a read here? Or will have to to put everything into a container?
Thanks for any help received.
HTML Code:
<!DOCTYPE HTML>
<html>
<head>
<link rel="stylesheet" href="footer.css" type="text/css"/>
<link rel="stylesheet" href="body.css" type="text/css"/>
</head>
<body>
<div>
</div>
<div id="img">
<img src="images/deets.png">
</div>
<div id="footer">
<ul id="footer_menu">
<li class="homeButton"></li>
<li>Profile
<div class="three_column_layout">
<div class="col_3">
<p></p>
</div>
</div>
</li>
<li>Work Exp
<div class="two_column_layout">
</div>
</li>
<li>Qualifications
<div class="two_column_layout">
<div class="col_2">
<a class="headerLinks">Test</a>
</div>
</div>
</li>
<li class="right">Log Out</li>
</ul>
<ul id="notifications">
<li>
<img src="images/twitter.png"
</li>
<li>
<img src="images/facebook.png">
</li>
</ul>
</div>
</body>
Footer CSS:
body{
background:rgba(20,20,20,1);
}
#footer{
position:fixed;
bottom:0px;
margin:0;
padding:0;
left:0;
right:0;
width:100%;
height:40px;
font-family:Arial;
text-shadow:1px 1px 1px black;
border-top:1px solid rgba(0,0,0,1.0);
background: rgba(0,0,0,0.5);
box-shadow:inset 0 1px rgba(255,255,255,0.3), inset 0 10px rgba(255,255,255,0.2),
inset 0 10px 20px rgba(255,255,255,0.25), inset 0 -15px 30px rgba(0,0,0,0.3);
}
#footer h2{
font-weight:normal;
font-size:14px;
text-decoration:underline;
color:#CC0000;
margin-top:10px;
margin-bottom:5px;
margin-left:10px;
}
#footer p{
color:white;
font-size:12px;
float:left;
padding:0px 10px;
margin:10px 0px;
}
#footer img{
border:none;
}
#footer li ul{
list-style:none;
padding:0px;
margin-bottom:12px;
}
.clear{
clear:both;
display:block;
overflow:hidden;
visibility:hidden;
width:0px;
height:0px;
}
#footer .whiteBorder{
border:1px solid white;
}
#footer .img_left{
float:left;
margin-right:10px;
width:40px;
}
#footer .black_box{
background:rgba(0,0,0,0.4);
padding:5px;
margin-bottom:5px;
border-radius:5px;
}
#footer #notifications{
float:right;
width:auto;
margin:5px 15px 0px;
padding:0px;
overflow:hidden;
}
#footer #notifications li{
margin-right:12px;
float:left;
width:24px;
padding:0px;
height:32px;
list-style:none;
}
#footer #notifications li:hover{
margin-top:-1px;
}
#a .notificationIcons span{
display:none;
font-size:12px;
color:white;
bottom:45px;
width:150px;
position:absolute;
border:1px solid #333333;
padding:5px;
margin-left:-70px;
background:rgba(0,0,0,0.4)
}
#a .notificationIcons:hover span{
display:block;
}
#footer_menu{
margin:0px;
padding:0px;
width:auto;
}
#footer_menu li{
list-style:none;
text-align:center;
width:75px;
float:left;
font-size:12px;
padding:12px 14px 14px 14px;
border-right:1px solid rgba(0,0,0,0.4);
background:rgba(0,0,0,0.1);
}
#footer_menu li:hover{
background:rgba(0,0,0,0.3);
}
#footer_menu li a{
display:block;
color:#CCCCCC;
text-decoration:none;
}
#footer_menu li a:hover{
color:white;
}
#footer_menu .homeButton{
padding:5px 8px 0px 5px;
border:none;
background:none;
}
#footer_menu .homeButton a{
background:url("C:/Users/Charlie/Desktop/CV Website/images/greyhouse1.png") top left no-repeat;
width:36px;
height:30px;
}
#footer_menu .homeButton:hover{
background:none;
}
#footer_menu .homeButton a:hover{
background:url("C:/Users/Charlie/Desktop/CV Website/images/whitehouse2.png") top left no-repeat;
}
/*Programs menu drop-up box*/
#footer_menu li ul.dropup{
display:none;
}
#footer_menu li:hover ul.dropup{
display:block;
position:absolute;
margin: 0 0 0 -15px;
bottom:40px;
border:1px solid #111111;
border-bottom:none;
background:rgba(0,0,0,0.5);
}
#foot_menu li:hover li{
float:none;
background:none;
border:none;
border-bottom:1px solid #111111;
padding:12px 10px 12px 10px;
}
/*Drop up default links*/
#footer_menu li:hover a{
color:#aaaaaa;
}
#footer_menu li:hover a:hover{
color:white;
}
/*Header links*/
.headerLinks {
display:none !important;
}
#footer_menu li:hover a.headerLinks{
font-size:14px;
text-decoration:underline;
margin-bottom:5px;
color:#CC0000;
margin-top:10px;
margin-left:10px;
display:block !important;
}
#footer_menu li:hover a.headerLinks:hover{
color:white;
cursor:pointer;
}
/*List links*/
#footer_menu li:hover a.listLinks{
font-size:12px;
color:#aaaaaa;
margin-left:10px;
}
#footer_menu li:hover a.listLinks:hover{
color:white;
cursor:pointer;
}
#footer_menu .right{
float:right;
right:0px;
margin-right:2px;
border-right:none;
border-left:1px solid rgba(0,0,0,0.3);
}
/*Layouts*/
#footer .one_column_layout,
#footer .two_column_layout,
#footer .three-column_layout,{
margin:4px;
position:absolute;
padding-bottom:15px;
display:none;
text-align:left;
}
/*Width of each layout*/
#footer .one_column_layout{width:140px;}
#footer .two_column_layout{width:280px;}
#footer .three_column_layout{width:420px;}
/*Display Dropup menus on hover */
#footer_menu li:hover .one_column_layout,
#footer_menu li:hover .two_column_layout,
#footer_menu li:hover .three_column_layout{
display:block;
position:absolute;
text-align:left;
margin:0 0 0 -15px;
bottom:40px;
background:rgba(0,0,0,0.5);
}
#footer.col_1,
#footer.col_2,
#footer.col_3{
display:block;
float:left;
position:relative;
margin-left:5px;
margin-right:5px;
}
#footer.col_1{width:130px;}
#footer.col_2{width:270px;}
#footer.col_3{width:410px;}
Body CSS:
body {
background-image:url('C:/Users/Charlie/Desktop/CV Website/images/background1.png');
box-shadow:5px 5px 2px;
background-repeat: repeat-y;
background-attachment:fixed;
background-position:center;
max-width:1080px;
}
#javaPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/java.png');
position:fixed;
top:5%;
left:28.8%;
max-width:100%;
}
#javaPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/java2.png');
}
#htmlcssPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/htmlcss.png');
position:fixed;
top:5%;
right:28.8%;
max-width:100%;
}
#htmlcssPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/htmlcss2.png');
}
#javascriptPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/javascript.png');
position:fixed;
top:35%;
left:28.8%;
max-width:100%;
}
#javascriptPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/javascript2.png');
}
#phpPic {
width:366px;
height:236px;
display:block;
border:1px solid white;
background:transparent url('C:/Users/Charlie/Desktop/CV Website/images/php.png');
position:fixed;
top:35%;
right:28.8%;
max-width:100%;
}
#phpPic:hover {
background-image: url('C:/Users/Charlie/Desktop/CV Website/images/php2.png');
}
#img {
position:fixed;
top:0.5%;
left:28.8%;
display:block;
max-width:100%;
}
i'm creating a horizontal submenu but the width doesn't extend check this please
CSS
nav{
width:62px;
height:409px;
float:left;
margin-left:0;
margin-top:25px;
}
nav a:link,nav a:visited{
width:59px;
height:67px;
float:left;
display:block;
background:#ccc;
margin-bottom:19px;
font-family:tahoma;
font-weight:bold;
font-size:9px;
text-transform:uppercase;
color:#fff;
line-height:62px;
text-align:center;
}
nav .menu{
width:59px;
height:67px;
float:left;
position:relative;
margin-bottom:19px;
}
nav .submenu{
position:absolute;
top:0;
left:59px;
background:#f78f1e;
height:40px;
min-width: 20px;
max-width: 600px;
}
nav .submenu a{
display:block;
float:left;
height:40px;
line-height:40px;
width:50px;
}
HTMLnav{
width:62px;
height:409px;
float:left;
margin-left:0;
margin-top:25px;
}
nav a:link,nav a:visited{
width:59px;
height:67px;
float:left;
display:block;
background:#ccc;
margin-bottom:19px;
font-family:tahoma;
font-weight:bold;
font-size:9px;
text-transform:uppercase;
color:#fff;
line-height:62px;
text-align:center;
}
nav .menu{
width:59px;
height:67px;
float:left;
position:relative;
margin-bottom:19px;
}
nav .submenu{
position:absolute;
top:0;
left:59px;
background:#f78f1e;
height:40px;
min-width: 20px;
max-width: 600px;
}
nav .submenu a{
display:block;
float:left;
height:40px;
line-height:40px;
width:50px;
}
HTML
<nav>
contact
works
partners
<div class="menu">
about us
<div class="submenu">
audio
video
<div style="clear:both"></div>
</div>
</div>
services
</nav>
Fiddle
http://jsfiddle.net/7D9hV/
Try using backgournd:inherit for your anchor-styling
nav .submenu a{
background:inherit;
display:block;
float:left;
height:40px;
line-height:40px;
width:50px;
}
This is working for me. Try it
nav .submenu a {
background: inherit; /// remove 'none'
display: block;
float: left;
height: 40px;
line-height: 40px;
width: 50px;
}
nav .submenu {
position: absolute;
top: 0;
left: 59px;
background: #f78f1e;
height: 40px;
width: 100px; // assign width
min-width: 20px;
max-width: 600px;
}
Sorry, scratch previous comment. It's the background: none; on nav .submenu a. Remove this and they appear. Your setting the background to none so you can't see them as the text is white:
http://jsfiddle.net/7D9hV/7/
For a top menu of my website I am using a css file. The menu works fine for me but I noticed that on smaller screen the menu breaks down, that two or more item of the menu coming down for lack of space. I tried to modified the different parameter of the css but still it did not work. Can anyone please suggest me for the modification of the following css so that the menu works same in different resolution of devices.
CSS
body {
margin:0px;
}
#nav {
background-color:#262626;
width:100%;
height:50px;
box-shadow: 0px 1px 30px #5E5E5E;
position:fixed;
top:0px;
}
#nav > ul {list-style:inside none; padding:0; margin:0;}
#nav > ul > li {list-style:inside none; padding:5px; margin:0; float:left; display:block; position:relative;}
#nav > ul > li > a{ padding: 10px; outline:none; display:block; position:relative; padding:12px 20px; font: 1em/100% Arial, Helvetica, sans-serif; text-align:center; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.4); }
#nav > ul > li > a:after{ content:''; position:absolute; top:-1px; bottom:-1px; right:-2px; z-index:99; }
#nav ul li.has-sub:hover > a:after{top:0; bottom:0;}
#nav > ul > li.has-sub > a:before{ content:''; position:absolute; top:18px; right:6px; border:5px solid transparent; border-top:5px solid #fff; }
#nav > ul > li.has-sub:hover > a:before{top:19px;}
#nav ul li.has-sub:hover > a{ background:#2198bf; border-color:#3f3f3f; padding-bottom:13px; padding-top:13px; top:-1px; z-index:999; }
#nav ul li.has-sub:hover > ul, #cssmenu_top ul li.has-sub:hover > div{display:block;}
#nav ul li.has-sub > a:hover{background:#2198bf; border-color:#3f3f3f;}
#nav ul li > ul, #cssmenu_top ul li > div{ display:none; width:auto; position:absolute; top:38px; padding:10px 0; background:#3f3f3f; border-radius:0 0 5px 5px; z-index:999; }
#nav ul li > ul{width:200px;}
#nav ul li > ul li{display:block; list-style:inside none; padding:0; margin:0; position:relative;}
#nav ul li > ul li a{ outline:none; display:block; position:relative; margin:0; padding:8px 20px; font:10pt Arial, Helvetica, sans-serif; color:#fff; text-decoration:none; text-shadow:1px 1px 0 rgba(0,0,0, 0.5); }
.title {
color:#FF0000;
padding-top: 8px;
font-family:verdana;
font-size:20px;
width:20px;
margin-top:6px;
margin-left:150px;
font-weight:bold;
float:left;
}
.subtitle {
color:#FF0000;
font-family:verdana;
font-size:15px;
}
#navigation{
list-style-type:none;
}
li {
display:inline;
padding:10px;
}
#nav a{
font-family:verdana;
text-decoration:none;
color:#EDEDED;
}
#nav a:hover {
color:#BDBDBD;
}
#body {
width:98%;
margin:0px auto;
margin-top:80px;
font-family:verdana;
}
hr {
border:1px solid #262626;
}
.menu_extended{
position: fixed;
width: 100%;
height: 5px;
top: 48px;
left: 0px;
background-color: #CC0000;
box-shadow: 0px 1px 30px #5E5E5E;
}
In the body of my html page i am writting the following way for creation of menu:
<div id="nav">
<p class="title">
<span style="color:0000FF;"> </span>
</p>
<ul>
<li><a href="index.php" >Home</a></li>
<li>Reading</li>
<li>Multimedia</li>
<li><a href="test_home.php" >Test Yourself</a></li>
<li>Sit for Exam</li>
<li>Analysis</li>
<li>Tips And Tricks</li>
<li>About</li>
</ul>
</div>
Any help ?
Reponsive menu bar can easily be achieved by media queries.If you don't about them then seach it on google.I am providing you a demo url https://developer.mozilla.org/en-US/docs/Web/Guide/CSS/Media_queries.
In this you have to apply css to your menu bar according to width of device
To make a Responsive menu bar and to target each devices. you can use #media queries.
// normal style
#header-image {
background-repeat: no-repeat;
background-image:url('image.gif');
}
// show a larger image when you're on a big screen
#media screen and (min-width: 1200px) {
#header-image {
background-image:url('large-image.gif');
}
}
// remove header image when printing.
#media print {
#header-image {
display: none;
}
}
i have the following CSS for a navigation menu
ul#css3menu_top,ul#css3menu_top ul {
margin:0;
list-style:none;
padding:0;
}
ul#css3menu_top,ul#css3menu_top .submenu {
background-color:#EEEEEE;
-moz-border-radius:5px;
-webkit-border-radius:5px;
border-radius:5px;
}
ul#css3menu_top .submenu {
visibility:hidden;
position:absolute;
left:0;
top:100%;
opacity:0;
-moz-transition:all 0.5s;
-webkit-transition:opacity 0.5s;
-o-transition:opacity 0.5s;
-moz-box-shadow:3.5px 3.5px 5px #000000;
-webkit-box-shadow:3.5px 3.5px 5px #000000;
box-shadow:3.5px 3.5px 5px #000000;
float:left;
background-color:#EEEEEE;
border-width:2px;
border-radius:6px;
-moz-border-radius:6px;
-webkit-border-radius:6px;
border-color:#FFF;
padding:0 10px 10px;
}
ul#css3menu_top li:hover>.submenu {
visibility:visible;
opacity:1;
}
ul#css3menu_top li {
position:relative;
display:block;
white-space:nowrap;
font-size:0;
float:left;
}
ul#css3menu_top li:hover {
z-index:1;
}
ul#css3menu_top ul .submenu {
z-index:2;
position:absolute;
left:100%;
top:0;
}
ul#css3menu_top {
font-size:0;
width:100%;
z-index:999;
position:relative;
display:inline-block;
zoom:1;
padding:0 0%;
margin:0 0%;
*display:inline;
}
ul#css3menu_top .column {
float:left;
}
* html ul#css3menu_top li a{
display:inline-block;
}
ul#css3menu_top>li {
margin:0;
width:17%;
}
ul#css3menu_top li.toplast{
width:15%;
}
ul#css3menu_top a:active, ul#css3menu_top a:focus {
outline-style:none;
}
ul#css3menu_top a{
display:block;
vertical-align:middle;
text-align:left;
text-decoration:none;
font:bold 14px Calibri;
color:#EEEEEE;
text-shadow:#FFF 0 0 1px;
cursor:pointer;
padding:6px 15px 6px 3px;
background-color:#666666;
background-image:url("mainbk.png");
background-repeat:repeat;
background-position:0 0;
border-width:0 0 0 1px;
border-style:solid;
border-color:#c0c0c0;
}
ul#css3menu_top ul li {
float:none;
margin:10px 0 0;
}
ul#css3menu_top ul a {
text-align:left;
padding:4px;
background-color:#EEEEEE;
background-image:none;
border-width:0;
border-radius:0px;
-moz-border-radius:0px;
-webkit-border-radius:0px;
font:14px Calibri;
color:#666666;
text-decoration:none;
}
ul#css3menu_top li:hover>a,ul#css3menu_top li a.pressed {
background-color:#EEEEEE;
color:#666666;
background-position:0 100px;
text-decoration:none;
}
ul#css3menu_top img {
border:none;
vertical-align:middle;
margin-right:6px;
}
ul#css3menu_top span {
display:block;
overflow:visible;
background-position:right center;
background-repeat:no-repeat;
padding-right:0px;
}
ul#css3menu_top ul span {
padding-right:8px;
}
ul#css3menu_top ul li:hover>a,ul#css3menu_top ul li a.pressed {
background-color:#EEEEEE;
background-image:none;
color:#666666;
text-decoration:none;
}
ul#css3menu_top li.topfirst>a {
padding-left: 7px;
border-width:0;
border-radius:4px 0 0 4px;
-moz-border-radius:4px 0 0 4px;
-webkit-border-radius:4px;
-webkit-border-top-right-radius:0;
-webkit-border-bottom-right-radius:0;
}
ul#css3menu_top li.toplast>a {
padding-right: 7px;
border-radius:0 4px 4px 0;
-moz-border-radius:0 4px 4px 0;
-webkit-border-radius:0;
-webkit-border-top-right-radius:4px;
-webkit-border-bottom-right-radius:4px;
}
#media only screen and (max-width:900px),only screen and (max-device-width:900px){
ul#css3menu_top>li{width:33%;}ul#css3menu_top>li:nth-child(3){width:34%}ul#css3menu_top>li:nth-child(n+4){width:33%;}ul#css3menu_top>li:nth-child(6){width:34%}}
#media only screen and (max-width:600px),only screen and (max-device-width:600px){
ul#css3menu_top>li{width:50%;}ul#css3menu_top>li:nth-child(n+3){width:50%;}ul#css3menu_top>li:nth-child(n+5){width:50%;}}
#media only screen and (max-width:450px),only screen and (max-device-width:450px){
ul#css3menu_top>li{width:100%;}ul#css3menu_top>li:nth-child(n+2){width:100%;}ul#css3menu_top>li:nth-child(n+3){width:100%;}ul#css3menu_top>li:nth-child(n+4){width:100%;}ul#css3menu_top>li:nth-child(n+6){width:100%;}}
/*opera hack*/
#media only screen and (min-width:900px){
html>/**/body noindex:-o-prefocus, html>/**/body ul#css3menu_top{
display:table;
}
html>/**/body noindex:-o-prefocus, html>/**/body ul#css3menu_top>li{
width:auto;
float:none;
display:table-cell;
}
html>/**/body noindex:-o-prefocus, html>/**/body ul#css3menu_top li.toplast{
width:auto;
display:table-cell;
}
}
i cannot work out how to make the text colour change when i hover over it on the sub menu
here is a fiddle of it working
http://jsfiddle.net/n3FAq/
any one got any ideas?
Try this
ul#css3menu_top ul li a:hover {
color: #c00;
}
DEMO
You don't have a hover rule for links in the submenu.
ul#css3menu_top .submenu a:hover {
color: red;
}
JSFiddle
I am working on http://www.comehike.com (right now just a sandbox) and you can see that if you hover over the "hikes" nav item, the dropdowns appear to be behind the page content.
I saw a number of threads regarding similar issues, but none of those were what I needed.
Here is my css just in case:
html
{
margin-bottom:2px;
min-height:100%;
}
body
{
background-image:url('http://www.comehike.com/img/ui/grass.jpg');
}
#navigation
{
width:100%;
height:30px;
background-color:#white;
font-family:verdana,arial;
text-color:#557803;
}
#navigation ul
{
margin:0px; padding:0px;
}
#navigation ul li
{
display:inline; height:30px; float:left; list-style:none; margin-right:5px;
position:relative;
}
#navigation li a
{color:#557803; text-decoration:none;}
#navigation li a:hover
{color:#black; text-decoration:underline;}
#navigation li ul
{
margin:0px;
padding:0px;
display:none;
position:absolute;
left:0px;
top:20px;
background-color:#black;
}
#navigation li:hover ul
{
display:block;
width:160px;
}
#navigation li li
{
list-style:none;
display:list-item;
}
#navigation li li a
{color:#fff; text-decoration:none;}
#navigation li li a:hover
{color:#fff; text-decoration:underline;}
div.headerMainNav
{
color:#333333;
font-family:verdana,arial;
font-size:16px;
height:auto;
line-height:150%;
position:relative;
text-align:right;
float:right;
}
a:link
{
color:#557803;
text-decoration:none;
}
a:hover {
color:#999999;
text-decoration:none;
}
a:visited {
color:#557803;
text-decoration:none;
}
#pageBody
{
background-color:#FFFFFF;
border:2px solid #999999;
left:0;
margin-left:auto;
margin-right:auto;
padding-left:15px;
padding-right:15px;
top:5px;
width:800px;
}
#administrationHeader
{
background-color:#FFFFFF;
left:0;
margin-left:auto;
margin-right:auto;
margin-top:3px;
padding-right:5px;
text-align:right;
font-size: 9pt;
top:5px;
width:800px;
}
div.logo
{
clear:top;
clear:bottom;
left:0;
padding:0px;
position:relative;
width: 200px;
height:80px;
float:left;
}
div.mainBody
{
color:#333333;
font-family:verdana,arial;
font-size:14px;
height:auto;
line-height:150%;
position:relative;
}
div.footer
{
color:#999999;
font-family:times,serif;
font-size:10px;
padding-top:20px;
line-height:150%;
position:relative;
text-align:center;
bottom:10px;
style=clear:both;
}
I think that you need to take care of z-indexs.