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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T15:48:15+00:00 2026-05-23T15:48:15+00:00

Basically this isn’t working out how I’d like it too. The navigation buttons are

  • 0

Basically this isn’t working out how I’d like it too. The navigation buttons are just floating to the right and not staying inside of their parent div.
The HTML I have is:

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8" />
    <title>UI Test</title>
    <link type="text/css" rel="stylesheet" href="main.css" />
</head>

<body>
    <div id="container">
        <div id="header">
            <div class="first">
                First column stuff
            </div>

            <div class="second">
                <a href="#" class="nav_button">Current Projects</a>
                <a href="#" class="nav_button">Build New Project</a>
                <a href="#" class="nav_button">Fund Projects</a>
            </div>
        </div>
    </div>
</body>
</html>

and my main.css file looks a little like this:

#header {
    display: block;
    background-color: #2a2626;
    color: #fff;
    border-bottom: 4px solid #000;
    border-top: 8px solid #000;
    padding-top: 8px;
}

.first {
    float: left;
    width: 20%;
}

.second {
    float: right;
}

.clear { clear: both; }

.nav_button {
    background-image: -webkit-gradient(
        linear,
        left bottom,
        right bottom,
        color-stop(0.14, rgb(44,132,145)),
        color-stop(0.79, rgb(103,191,204))
    );
    background-image: -moz-linear-gradient(
        left center,
        rgb(44,132,145) 14%,
        rgb(103,191,204) 79%
    );
    -moz-box-shadow: inset 0 0 8px rgba(255,255,255, 1);
    -webkit-box-shadow: inset 0 0 8px rgba(255,255,255, 1);

    color: white;
    font-family: Pare, Helvetica;
    font-size: 24pt;
    text-align: center;
    text-decoration: none;

    padding: 27px;
}

Here’s what it’s doing: https://i.stack.imgur.com/RdUOx.png
As you can see the height isn’t auto-adjusted and I’ve been trying to do it for a while now.
Anyone know what the problem is?

  • 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-23T15:48:16+00:00Added an answer on May 23, 2026 at 3:48 pm

    Old school method: Put a clearing element after your <div class="second">, such as <br style="clear: both" />, to force the parent element to completely enclose the buttons.

    Newer school method: make your #header be overflow: auto.

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

Sidebar

Related Questions

I'm in computer SCI AP and I can't figure out why this isn't working
I have code that basically looks like this (it isn't actually object, but rather
Maybe this isn't really feasible. But basically, I've been developing a snippet-sharing website and
This isn't a code question for once, but it definitely has me confused. Basically,
Basically this code below returns the right information, but I need to add the
So basically this code was working fine before. I had some computer issues and
I'm working on a new CMS to use on repeative projects. Basically this chunk
I know this isn't a direct technical problem but this seems like an ideal
Basically if this was .NET, it would look like this: ISomething { string A
I am not sure if this is even possible. Basically I want to load

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.