Jump to content

CSS navigation bar not working in IE

- - - - -

  • Please log in to reply
3 replies to this topic

#1
welton122

welton122

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
hi all,

okay this navigation menu was working perfectly in every type of browser but for some reason I have come back to it and its no longer working. basically this menu bar should display horizontally but it containues to display verticually. I dont kow if i have deleted anything.

I can't seem to see anything missing but can you all help me please?

Heres the CSS code:
div#navigation1 ul {

	background: url('Images/background2(LD).png') repeat-x;

	position:absolute;

	top:127px;

	right:0px;

	left:0px;	

	height: 22px;

	text-decoration: none;

}

div#navigation1 li {

	border-left:1px solid #999;

	border-right:1px solid #999;

	width:101px;

	height: 22px;

	list-style:none;

	text-decoration:  none;

	display: inline-block;

}

div#navigation1 a {

	color:#555;

	display:block;

	text-align:center;

	height: 22px;

	text-decoration:  none;

}

div#navigation1 a:hover {

	background:#e3e3e3;

	color:#555;

	height: 22px;

	text-decoration:  none;

}

div#navigation1 .active {

	background:#e3e3e3;

	color:#777;

	text-decoration:  none;

	height: 22px;

}

Thanks,
Jake

#2
WingedPanther

WingedPanther

    A spammer's worst nightmare

  • Moderators
  • 16,831 posts
  • Location:Upstate, South Carolina
  • Programming Language:C, C++, PL/SQL, Delphi/Object Pascal, Pascal, Transact-SQL, Others
  • Learning:Java, C#, PHP, JavaScript, Lisp, Fortran, Haskell, Others
Which version of IE are you testing under? Different versions of IE have different levels of support. Also, what is the HTML code you are using with it?
Programming is a branch of mathematics.
My CodeCall Blog | My Personal Blog

#3
welton122

welton122

    Learning Programmer

  • Members
  • PipPipPip
  • 76 posts
Im using IE 8 Version 8.0.7600.16385 and the HTML code is below:

<div id="navigation1">

<ul style="text-align: center;">

<li><a href="index.php">Home</a></li>

<li><a href="aboutme.php">About Me</a></li>

<li><a href="mywork.php">My Work</a></li>

<li><a href="contactme.php">Contact Me</a></li>

<?php if(!isset($userid)) { ?>

<li><a href="register.php">Register</a></li>

<?php } else { ?>

<li><a href="notifications.php">Notifications</a></li>

<?php } ?>

<?php if(isset($userid)) {?>

<li><a href="logout.php">Logout</a></li>

<?php } else { ?>

<li><a href="login.php">Login</a></li>

<?php } ?>

</ul>

</div>


<?php if (isset($userid)) {?>


<div id="navigation2">

<ul style="text-align: center;">

<li><a href="file.php">Files</a></li>

<li><a href="bookmark.php">Bookmarks</a></li>

<li><a href="friends.php">Friends</a></li>

<li><a href="settings.php">Settings</a></li>

</ul>

</div>

</div>


#4
Orjan

Orjan

    Writes binary right handed and hex left handed

  • Moderators
  • 3,299 posts
  • Location:Karlstad, Sweden
  • Programming Language:C, Java, C++, C#, PHP, JavaScript, Pascal
  • Learning:Java, C#
just a small comment...
your code
<?php if(!isset($userid)) { ?> 

<li><a href="register.php">Register</a></li> 

<?php } else { ?> 

<li><a href="notifications.php">Notifications</a></li> 

<?php } ?> 

<?php if(isset($userid)) {?> 

<li><a href="logout.php">Logout</a></li> 

<?php } else { ?> 

<li><a href="login.php">Login</a></li> 

<?php } ?> 

could be a lot simplier just doing this:
<?php if(!isset($userid)) { ?> 

<li><a href="register.php">Register</a></li> 

<li><a href="login.php">Login</a></li> 

<?php } else { ?> 

<li><a href="notifications.php">Notifications</a></li> 

<li><a href="logout.php">Logout</a></li>

<?php } ?> 

__________________________________________
I study Information Systems at Karlstad University when I'm not on CodeCall




1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users