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 8116681
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T03:54:24+00:00 2026-06-06T03:54:24+00:00

I am trying to keep elements in header in one row. My current styles

  • 0

I am trying to keep elements in header in one row. My current styles working but one problem is when I make my browser smaller or squeeze it (from right to left) then at one point the search element goes to second row or appear beneath the first row(which is menu row). And when I make it more smaller then whole menu div tag goes to second row and appears beneath logo.

What I want is when I make my browser smaller then all these elements should remain in the same row. How can I do this?

Here is my code

.header
.logo
.menu
    %ul
        %li
            %a{:href => '#', :rel => 'first'} Home
        %li
            %a{:href => '#', :rel => 'first'} Features
        %li
            %a{:href => '#', :rel => 'first'} Pricing
        %li
            %a{:href => '#', :rel => 'first'} Team
        %li
            %a{:href => '#', :rel => 'first'} Support
        %a{:href => '#', :rel => 'first'}
            %li.last Sign up for beta   
        .clear
.search
    %input{:type => 'text', :name => 'search'}
.clear

here is scss

.header-container {
width: 100%;
height: 100px;
}

.clear { clear: both; }

.header-container {
width: 100%;
background: url(menu-bg.jpg) no-repeat;
background-size: 100%;

.header {
    padding: 30px 100px;
    width: 68%;
    margin: 0 auto;

    .logo {
        width: 122px; height: 31px;
        margin-right: 10px;
        float: left;
        background: url(logo.png) no-repeat;
    }

    .menu {
        min-width: 500px;
        float: left;

        ul {
            line-height: 5px;
            list-style-type: none;

            li {
                float: left;
                margin-right: 25px;

                a {
                    color: #ffffff;
                    text-decoration: none;
                    font-size: 16px;
                }

                a:hover {
                    background: url(selected.jpg) no-repeat;
                }

                &.last {
                    color: #ffffff;
                    width: 148px; height: 38px;
                    margin-top: -16px;
                    padding: 16px 18px;
                    background: url(buttonbg.jpg) no-repeat;
                }
            }

        }
    }

    .search {

        input {
            width: 200px;
            float: right;
            padding: 5px;
            color: #ffffff;
            background-color: #2c3338;
            border: 1px solid #2c3338;
            background: url(search.png) no-repeat 98%;

        }

    }
}
}
  • 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-06T03:54:25+00:00Added an answer on June 6, 2026 at 3:54 am

    Apply min-width on body tag and check hope with this problem solved.

    body
    {
       min-width:1000px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently struggling to use UI elements in Interface Builder. I keep trying to
I'll keep it brief. I'm trying to make a div element height 100%. All
I'm trying to keep the list of values from drop-down selections when the browser
Im really trying to keep my code clean by using the switch statement but
I'm Trying to check XML elements for specific attributes so I can keep from
I'm trying to work out how to enlarge all elements on a page, but
I'm trying to keep track of number of comparison between array elements being made
I have a query mobile site and I am trying to keep my header
I'm trying to keep my code clean and keep the number of files down.
I'm trying to keep my xsl DRY and as a result I wanted to

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.