Click here to Skip to main content
15,867,488 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
I have a menu that opens open when an image is clicked on. However it messes up the rest of my layout in all browsers except firefox.

My CSS code
CSS
.signin_menu {
	position:relative;
 	: "."; 
	float:left;
	overflow:hidden;
	margin-left: -230px;
    	margin-top: 34px;
   	display:none;
    	width:190px;
   	list-style-type: none;
   	z-index: 5;
   	color:#FFFFFF;
}
.signin_menu li {
   	background-color: #000000;
   	padding:8px; 
}
.signin_menu ul {
	margin:0; 
	padding:0; 
	list-style:none;
}
.signin_menu li a {
   	color:#FFFFFF;
   	text-decoration:none;
   	padding:10px;
}
 
.signin_menu li a:hover {
    	padding:10px;
   	font-weight:bold;
   	color: #b0b0b0;
}
.signin_menu:after { /* FF, IE8, O, S, etc. */
	display:none; 
 	visibility:hidden; 
 	clear:both; 
 	height:0; 
 	content: "."; 
 }


The menu
HTML
<ul class="signin_menu">
  	
  	<li>
    <form id="form1" action="login.php" method="post">
      <?php echo _('Username'); ?>
      <input type="text" name="username" id="username" />
      
        <?php echo _('Password'); ?>
        <input type="password" name="password" id="password" />
      
       <?php echo _('Not a member?'); ?> - <a href="register.php"><?php echo _('Register'); ?></a> <?php echo _('now!'); ?>
       <input type="submit" id="login" name="login" value="<?php echo _('Sign in'); ?>" />
      
            <center><div id="message"></div></center>
	</form>
	<?php echo _('Or log in with Facebook'); ?>:
	<a href="<?php echo $loginUrl; ?>"><img src="images/loginfb.png" border="0"></a>
	</li>
	
  </ul>


I have tried many different ways but this above is the best I've got so far. Changing the ul to a div and removing the li tags gives me the same result. Any ideas?
Posted

1 solution

I fixed it with absolute positioning instead of relative. The menu was in the header of the site.
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900