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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T07:56:57+00:00 2026-06-16T07:56:57+00:00

Should look like this: (source: gyazo.com ) My attempt <div class="header"> <div class="container"> <img

  • 0

Should look like this:
img
(source: gyazo.com)

My attempt

<div class="header">
   <div class="container">
   <img id="logo" src="img/logo.png"/>
      <ul class="menu">
        <a href="#"><li class="current">Home</li></a>
        <a href="#"><li>Forums</li></a>
        <a href="#"><li>Donate</li></a>
        <a href="#"><li>Vote</li></a>
        <a href="#"><li>Info</li></a>
      </ul>
   </div>
</div>

I use Current class for the current page background.

Added the header

.header {
width: 100%;
height: 86px;
background-image: url("../img/gradient.png");
background-repeat: repeat-x;
border-bottom: solid 1px #a2a2a2;
}
 

Floated menu to right, made it display inline and centered the text

.menu {
float: right;
padding: 2.7%;

}
.menu  a{
color: #1e1e1e;
}
.menu  a:hover{
color: #5e5e5e;
}

.menu li {
display: inline;
float: left;
margin-left: 10px;
padding-left: 20px;
padding-top: 5px;
}

Now the part of the current background

.current {
background-image: url("../img/hoverdiamond.png");
background-repeat: no-repeat;
width: 78px;
height: 36px;
padding-left: 20px;
padding-top: 5px;
color: white;
}

Result:

img2
(source: gyazo.com)

Can you see theres a big space between the current and other items? How do I remove this? make it equal to others spaces.

Things I tried:

Adding position relative

result:
Menu item ‘current’ goes over the menu item ‘forums’

I could not find any other way to do so, what am I doing wrong?

  • 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-16T07:56:58+00:00Added an answer on June 16, 2026 at 7:56 am

    Try the following HTML:

    <div class="header">
       <div class="container">
          <img id="logo" src="img/logo.png"/>
          <ul class="menu">
            <li class="current"><a href="#">Home</li></a>
            <li><a href="#">Forums</a></li>
            <li><a href="#">Donate</a></li>
            <li><a href="#">Vote</a></li>
            <li><a href="#">Info</a></li>
          </ul>
       </div>
    </div>
    

    With the following amends to your CSS:

    .menu {
        float: right;
        padding: 2.7%;
    }
    .menu li {
        float: left;
        margin-left: 10px;
    }
    .menu  a{
        color: #1e1e1e;
        display: block;
        padding-left: 20px;
        padding-top: 5px;
    }
    .menu  a:hover{
        color: #5e5e5e;
    }
    .current {
        background-image: url("../img/hoverdiamond.png");
        background-repeat: no-repeat;
        color: white;
    }
    

    Your HTML was structured incorrectly … you shouldn’t be placing the <li> elements inside the anchor elements.

    You also don’t need to have display: inline; on the list items, as they are floated left anyway, they should already be inline.

    In future, you may want to check that your HTML is valid using the W3C validator, it should explain any errors in your HTML and how you can fix them.

    Let me know if the above doesn’t fix it and I’ll happily have another look.

    EDIT: Forgot to also state that I removed the height and width on the current css declaration, that was unnecessary, and almost definitely causing the spacing issues.

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

Sidebar

Related Questions

The html code source order should look like this: <body> <div>col2</div> <div>col3</div> <div>col1</div> <div>col4</div>
I've been trying to create a generic event. Basically it should look like this:
I'm trying to develop a component that should look somewhat like this I'm using
Does this look like it should work? I'm wanting to generate directions from one
I'm working on an Android app that will look like this (Photoshop mockup): (source:
I've got a table where the columns that matter look like this: username source
My Xml Should look like: <?xml version=1.0 encoding=UTF-8 standalone=yes?> <results> <version>1.0</version> <status>ok</status> <lastUpdate>2011-11-21 09:23:59.0</lastUpdate>
I need to create a activity which should look like as a dialog box
I'm trying to make a drawable which should look like in the image below:
I'm trying to create a custom UIButton that should look like a UIButtonTypeRoundedRect. In

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.