Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7014455
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T22:31:23+00:00 2026-05-27T22:31:23+00:00

I have a Header/navigation bar on a site, it has a logo, navigation menu,

  • 0

I have a Header/navigation bar on a site, it has a logo, navigation menu, and search box all in-line in that order

So the logo is on the left, followed by the nav menu and the the search box to the right.

The search box is aligned using position: relative; the problem is it is positioned relative to the nav menu which is the div before the search box.

The reason that is a problem, is because the nav menu can be of different sizes, depending on which menu items it is showing.

I need a reliable way to position my search box, is there a way to position a Div relative to a certain Div and not just the Div that is directly before it?

In the image the search box should be positioned over the sidebar, but like I mentioned the nav menu can be of different lengths so If I position relative X off of it, it will be different depending on the width of that menu
enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-27T22:31:23+00:00Added an answer on May 27, 2026 at 10:31 pm

    Put a wrapper around your nav menu and give it a fixed width.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a site with a search box that works fine in all browsers
assume I have a such html order <div id=header>>Header(logo, navigation menus etc)will be here,
I have a jQM application that uses the header as a navigation bar. The
Something basic that i don't understand: I have header.php with navigation bar for my
I have a navigation bar that is displayed correctly (all the way to the
Imagine I have a navigation bar in my page header, with a number of
I have a header file, lets say Common.h, that is included in all of
I have a header navigation with kinda difficult hover effect. In order to make
[www.tdeltd.net][1] [1]: http://tdeltd.net is my site. The navigation bar is broken in all versions
I have a nav bar application that uses a custom header that I created

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.