Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: CSS HTML jQuery
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
.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
<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 31-Jan-12 0:14am

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

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

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

  Print Answers RSS
0 OriginalGriff 7,903
1 Sergey Alexandrovich Kryukov 7,127
2 DamithSL 5,604
3 Manas Bhardwaj 4,986
4 Maciej Los 4,820


Advertise | Privacy | Mobile
Web02 | 2.8.1411023.1 | Last Updated 31 Jan 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100