Jump to content
MakeWebGames

I think my DIV tags effect my naivgation bar


PHPDevil

Recommended Posts

Hi guys,

I have this extract from my code

 

.bg {
   width: 100%;
   height: 100%;
   attachment:fixed;
   position: absolute;
   top: 0;
   left: 0;
   z-index: -5000;
}
body
{
margin: 0 auto;
background-color: black;
background-attachment: fixed;
}
div.container
{
margin: 0 auto;
width: 1000px;
}
#nav 
{
  width: 100%;
  position:fixed;
  float: left;
  margin: 0 0 0 0;
  padding: 0;
  list-style: none;
  background-color: #000000; 
}
#nav li 
{
  float: left; 
}
#nav li a 
{
  display: block;
  padding: 8px 15px;
  text-decoration: none;
  font-weight: bold;
  color: #069;
  border-right: 1px solid #333; 
}
#nav li a:hover 
{
  color: #c00;
  background-color: #000; 
}
.bannerimage {
   position:relative;
   float:left; /* optional */
width:1000px;
height:200px;
}
.bannerimage .text {
position:absolute;
top:65px; /* in conjunction with left property, decides the text position */
left:32px;
width:193px; /* optional, though better have one */
color:#FF8000;
height: 146px;
}

 

<!-- Navigation -->
<ul id='nav'>
      <li><a href='login.php'>Home </a></li>
      <li><a href='register.php'>Mailbox (0)</a></li>
      <li><a href='forgotpassword.php'>Events (0)</a></li>
      <li><a href='register.php'>Inventory</a></li>
      <li><a href='forgotpassword.php'>City</a></li>
      <li><a href='forgotpassword.php'>Chat (0)</a></li>
      <li><a href='register.php'>Missions</a></li>
      <li><a href='contact.php'>Education</a></li>
      <li><a href='t&c.php'>Employment</a></li>
      <li><a href='login.php'>Hospital </a></li>
      <li><a href='register.php'>Jail</a></li>
      <li><a href='forgotpassword.php'>Forums</a></li>
      <li><a href='contact.php'>Search</a></li>
      <li><a href='t&c.php'>Donator</a></li>
      <li><a href='register.php'>News</a></li>
      <li><a href='register.php'>Faction</a></li>
     </ul>
<!-- Container -->

<div class="container">
<!-- Banner -->
<div class="bannerimage">
<div align="center"><img src="gameimage/newbann.png" style="margin-top: 37px; " /> </div> 
   	<div class="text">
   	<h3 style="margin-top:0px; margin-bottom:0px;">Username</h3>
       <br />
       Level:<br />
       Money:<br />
       Gold:<br />
   	</div>
</div>

 

Now through debugging if I removed the code following the banner comment my nevigation bar works perfectly.

With the code after the banner comment added, my navigation bar buttons work for the first few buttons and the rest refuse to co operate.

I've concluded it must be down to the div tags but i've got little knowledge over HTML so would be grateful if anyone can see what the issue is

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...