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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:30:12+00:00 2026-06-07T00:30:12+00:00

I’m trying to make a little web layout. What I have so far is

  • 0

I’m trying to make a little web layout. What I have so far is this.

I’m trying to get the buttons on the same horizontal line as the navigation bar. In other words, I want the “display date” button directly to the right of the “home” navigation button. I can’t change the margins on the buttons – it adjusts itself to the bottom border of the nav bar, as in, at a margin of 0 it’s directly under the nav bar’s bottom border (like you can see in the screenshot).

Sorry if the code is messy or hard to read, I’m at the very beginning level.

Here is the code for it –

<!DOCTYPE html>
<html>
    
    <head>
        <!-- *****CSS CODE START*****-->
        <style type="text/css">
            /*navigation bar*/
            ul {
                list-style-type:none;
                margin:50;
                padding:0;
            }
            a:link, a:visited {
                display:block;
                font-weight:bold;
                color:#dd731c;
                background-color:#473e36;
                width:120px;
                text-align:center;
                padding:4px;
                text-decoration:none;
                text-transform:uppercase;
            }
            a:hover, a:active {
                background-color:#bea792;
            }
            a:hover {
                color:black;
            }
            a:active {
                color:#dd731c;
            }
            /*button margins*/
            button.button1 {
                margin-top:0px;
                margin-bottom:10px;
                margin-right:50px;
                margin-left:200px;
            }
            button.button2 {
                margin-top:0px;
                margin-bottom:10px;
                margin-right:50px;
                margin-left:200px;
            }
            button.button3 {
                margin-top:0px;
                margin-bottom:10px;
                margin-right:50px;
                margin-left:200px;
            }
            /*line*/
            #middle hr.line {
                height: 1px;
                margin: 0 30px 5px 30px;
            }
            /*other*/
            body {
                background-color:#473e36;
            }
            h1 {
                color:orange;
                text-align:center;
            }
            p {
                font-family:"Times New Roman";
                font-size:20px;
            }
        </style>
        <!-- *****CSS CODE END***** -->
    </head>
    <!-- *****HTML CODE START***** -->
    
    <body>
        <h1>title</h1>
        <!-- line -->
        <hr class="line">
        <!-- navigation bar list -->
        <ul>
            <li>
                <a href="#home">Home</a>
            </li>
            <li>
                <a href="#news">News</a>
            </li>
            <li>
                <a href="#contact">Contact</a>
            </li>
            <li>
                <a href="http://www.google.com">About</a>
            </li>
        </ul>
        <!-- buttons -->
        <button type="button" button class="button1" onclick="displayDate()">Display Date</button>
        <text id="demo">This is a paragraph.</text>
        <br />
        <button type="button" button class="button2" onclick="displayName()">Display Naaaame</button>
        <br />
        <button type="button" button class="button3" onclick="count()">count!</button>
        <text id="counter">0</text>
    </body>
    <!-- *****HTML CODE END***** -->




</html>
<!-- *****JavaScript CODE START***** -->
<script type="text/javascript">
    var currentNum = 1;




    function displayDate() {
        document.getElementById("demo").innerHTML = Date();
    }




    function displayName() {
        document.getElementById("demo").innerHTML = "jim";
    }




    function count() {
        document.getElementById("counter").innerHTML = currentNum;
        currentNum = ++currentNum;
    }
</script>
<!-- *****JavaScript CODE END***** -->
  • 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-07T00:30:15+00:00Added an answer on June 7, 2026 at 12:30 am

    Just add a float:left to your navigation ul.

    Here, http://jsfiddle.net/6HVtq/

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
this is what i have right now Drawing an RSS feed into the php,
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this
I have this code: - (void)parser:(NSXMLParser *)parser foundCDATA:(NSData *)CDATABlock { NSString *someString = [[NSString
I am trying to loop through a bunch of documents I have to put
I have some data like this: 1 2 3 4 5 9 2 6
I have a .ini file as follows: [playlist] numberofentries=2 File1=http://87.230.82.17:80 Title1=(#1 - 365/1400) Example
I am trying to understand how to use SyndicationItem to display feed which is
Basically, what I'm trying to create is a page of div tags, each has

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.