Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help please div jumping below nav

Featured Replies

Need some help please im trying to get my search bar to display within my navbar on the right but what ever i try it seems to stay below the navigation.

The css for the search box:

.msearch {
width:auto;
height:37px;
float:left;
position:block;
padding: 0;
margin: 0;

and the html/php for the nav and search box

<ul id="nav">
<?
if(isset($_COOKIE["user"])){
echo"
<li><a href='./index.php?action=myhome'>Home</a></li>";
}else{
echo"
<li><a href='./index.php'>Home</a></li>";
}
?>
<li><a href="./ladders.php" class="parent">Ladders</a>
<ul>
<li><a href="./standings.php?ladder[id]=4" class="news">Warhawk Team Ladder</a></li>
<li><a href="./standings.php?ladder[id]=5" class="news">Warhawk Doubles Ladder</a></li>
<li><a href="./standings.php?ladder[id]=6" class="news">Warhawk Singles Ladder</a></li>
</ul>
</li>

<li><a href="./tournaments.php" class="parent">Tournaments</a>
<ul>
<li><a href="./tournaments.php?tourney[id]=1" class="news">Warhawk Team Tournament</a></li>
</ul>
</li>

<li><a href="">Teams</a></li>

<li><a href='./freeagents.php'>Free Agents</a></li>

<li><a href="./members.php" class="parent">Members</a>
<ul>
<li><a href="./members.php" class="news">Rankings</a></li>
<li><a href="./members.php" class="news">Member search</a></li>
</ul>
</li>

<li><a href='http://www.transatlantickillers.co.cc'>Forums</a></li>

<li><a href="#" class="parent">More</a>
<ul>
<li><a href="./apply.php" title="Apply for staff" class="member">Apply for staff</a></li>
<li><a href="./admincp" class="member">Staff Page</a></li>
<li><a href="./help.php" class="forum">Help</a></li>
</ul>
</li>
<div class="msearch">
<form method="post" action="./search.php">
<input type="text" name="search[string]" class="sbox" maxlength="30" style="vertical-align:middle;" value="Search Ladders" onClick="this.value=''">
<input type="hidden" name="search[type]" value="ladd"> 
<input type="image" src="./theme/default/images/index_16.png" name="button" class="sbutton" style="vertical-align:middle;">
</form>
</div>
</ul>

 

Any help will be much appreciated ive just spent the last two hours trying to figure this out and its finally drove me crazy lol

If you set the <ul> to have position:relative, you could then place the search box absolutely inside that.

#nav {
position:relative;
}
#nav div.msearch {
position:absolute;
top:0;
right:0;
}

Could you post the css for the <ul> or, even better, is the site 'live' at the moment?

  • Author

Thanks Elanman positioning the search box absolute has got it within the navbar but its too far to the right now, ive tried left: 800; but no matter what number i put in there left or right it keeps sending it to the far left unless its at 0.

The css for ul

#nav {
width: 1000px;
height: 29px;
background-image: url(./theme/default/images/nav.jpg);
background-repeat: no-repeat;
margin: 0 auto;
z-index: 5000;
line-height: 27px;
position:relative;
}
#nav ul {
float: left;
width: auto;
height: 26px;
margin: 0;
padding: 4px 0 0 90px;
z-index: 5000;
}
#nav li {
display: inline;
position: relative;
list-style-type: none;
color: #fff;
z-index: 5000;
}
#nav li ul {
width: 200px;
display: none;
padding: 0;
margin: 0;
position: absolute;
left: 4px;
top: 17px;
z-index: 5000;
}

and the site live link

Thanks again

To change the absolute position of msearch, use

.msearch {
position:absolute;
top:0;
right:20px; / * or whatever you want * /
}

Remember to state the measurement unit ( px, em) unless the value is 0.

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.