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

  • Home
  • SEARCH
  • 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 8171349
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T21:26:07+00:00 2026-06-06T21:26:07+00:00

OK guys, here’s my problem. I have a navigation bar on my website, which

  • 0

OK guys, here’s my problem. I have a navigation bar on my website, which can be customized by the administrator of the site – he can add links to the navigation bar, so that list has dynamic width. At the right corner of the bar, I have a div element with a search box. These are the CSS properties of these two divs:

.head_navigation
{
    float:left;
    height:51px;
    padding-top:7px;
    margin:0;
    border:0;
    background:url("images/top_nav_bckg.gif") repeat-x bottom;
    text-align: center;
}

.head_navigation_right{
    float:right;
    border:0;
    margin:0;
    padding:0;
    padding-top:7px;
    height:51px;
    background:url("images/top_nav_bckg_right.gif") repeat-x bottom;
    text-align:right;
}

I can’t make the right div fill the blank space to its left side. Since the left div is dynamic, I can’t set a fixed margin for the right one. I also tried:

width: 100%;

and it puts the right div to the row below and fills the whole page. Any help?

  • 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-06-06T21:26:08+00:00Added an answer on June 6, 2026 at 9:26 pm

    http://jsfiddle.net/Zx9gw/1/

    From head_navigation_right remove the float property.

    .head_navigation_right{
        border:0;
        margin:0;
        padding:0;
        padding-top:7px;
        height:51px;
        background:url("images/top_nav_bckg_right.gif") repeat-x bottom;
        text-align:right;
    }​
    

    Unfortunately I can’t tell you why this is, I can just assume: float changes the display of an element, so that any other elements would take the rest of the space.

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

Sidebar

Related Questions

HI Guys, Here I am having problem that How can I post an image
Pretty Basic one here guys. I have a View which holds 2 textfields for
Hey guys here is the problem i am facing i have a User class
Just wanna ask u guys here, I have a drop down list box which
Hey guys I have a little issue here. I have a panel where I
Sorrry guys, I'm stuck here. I have a few grids, I also have CollectionViewSource
First I want to thank you guys here, because your posts have gotten me
I have some guys here who have code that needs to be compiled with
With the help of some of the guys here I have some regex to
I got a little problem here guys. I'm trying to implement the following scenario:

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.