Jump to content

[SOLVED] Help with an inline list


Darkmatter5

Recommended Posts

I have a list that I've gotten to display inline and gives me a nice menu affect.  Now I also want to put in a search textbox and submit button inline with this menu, but I can't get the search items to display inline with the menu.

 

Here's the css code for the navcontainer and the css for the list.

#navcontainer {
    line-height: 2.5em;
    height: 30px;
    width: 100%;
    border-bottom: 1px solid;
    /*text-align: center;*/
    /*background-color: fuchsia;*/
}
#navcontainer ul {
    margin: 0;
    padding: 0;
    margin-left: .5em;
    list-style-type: none;
}
#navcontainer ul li {
    display: inline;
    /*background: url(../images/bulletholes.png) repeat;*/
}
#navcontainer ul li a {
    text-decoration: none;
    font-weight: bold;
    padding: .2em 1em;
    color: #000000;
    background-color: #CCCC99;*/
    /*background: url(../images/bulletholes.png) repeat;*/
}
#navcontainer ul li a:hover {
    color: #000000;
    background-color: #CC9999;
}

 

Now here's the code in the php page

<div id="navcontainer">
  <?php $vein->user_rights($page); ?>
  <span style="float: right;">
    <form method="post" action="search.php">
    <input type="text" name="search" size="30" maxlength="30" /> <input type="submit" value="Search" />
    </form>
  </span>
</div>

 

Here's the user_rights function

function user_rights($page) {
  echo "<ul id='navlist'>
    <li><a href='index.php' id='current'>Home</a></li>
    <li><a href='help.php'>Help</a></li>
    <li><a href='/forums/'>Forums</a></li>
    <li><a href='users.php'>Users</a></li>
    <li><a href='games_movies.php'>Games and Movies</a></li>
    <li><a href='collections.php'>Collections</a></li>
    <li><a href='trades.php'>Trades</a></li>";
  if(isset($_SESSION['member_id'])) {
    echo "\n<li><a href='logoutscr.php'>Logout</a></li>";
    $member_id=$_SESSION['member_id'];
    $query=mysql_query("SELECT * FROM members WHERE member_id=$member_id") or die(mysql_error());
    $rights=mysql_fetch_array($query);
    if($rights['priv_admin']==1) { echo "\n<li><a href='admin.php'>Site admin</a></li>"; }
  }
  else { echo "\n<li><a href='gateway.php'>Login</a></li>"; }
  echo "</ul>";
}

 

I've attached a screenshot of how it's being rendered. In the screenshot I have three arrows showing where I need the search items to display at.

 

[attachment deleted by admin]

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

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.   Restore formatting

  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...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.