Darkmatter5 Posted April 22, 2009 Share Posted April 22, 2009 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 https://forums.phpfreaks.com/topic/155188-solved-help-with-an-inline-list/ Share on other sites More sharing options...
louisstephens Posted April 22, 2009 Share Posted April 22, 2009 Could you not float the menu left, and then the search right? Link to comment https://forums.phpfreaks.com/topic/155188-solved-help-with-an-inline-list/#findComment-816844 Share on other sites More sharing options...
Darkmatter5 Posted April 23, 2009 Author Share Posted April 23, 2009 I just put the list in a span and floated it left and the form in a span and floated it right. Thanks! you're idea worked! Link to comment https://forums.phpfreaks.com/topic/155188-solved-help-with-an-inline-list/#findComment-817296 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.