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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T18:18:33+00:00 2026-05-23T18:18:33+00:00

I am trying to position a span element with relative positioning (and displayed as

  • 0

I am trying to position a span element with relative positioning (and displayed as inline-block) after a a element with absolute positioning (and displayed as inline-block too). These two elements are in a li element. I succeeded with a bit of javascript, but if there is a css solution, I would really love to know it!

Here is the code I’m trying to “debug” http://jsfiddle.net/eKEEa/1/

Thanks in advance for helping!

  • 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-23T18:18:34+00:00Added an answer on May 23, 2026 at 6:18 pm

    I have changed your CSS from relative to positioning to float:left and removed the display:inline-block. Live example: http://jsfiddle.net/eKEEa/4/

    ul li{
        list-style: none;
        width: auto;
        height: 45px;
    }
    ul a{
        float: left;
        height: 30px;
        padding: 10px 10px 5px 10px;
        background: #ffffff;
        color:#000;
    }
    ul span{
        float: left;
        height: 30px;
        padding: 10px 10px 5px 10px;
        background: #2e8ab8;
        color: #fff;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to position a span element relative to the upper-right corner of
I am trying to position a gradient over an inline / inline-block anchor link,
What I am trying to do is position a list element over an inline
I am trying to position an span element (let us call it the tooltip
I am trying to set the Media Elements position by following code: MediaElement musicPlayer
I'm trying to use GridBagLayout to position labels in two rows, but I want
I am trying to retrieve the position of an HTML element inside a paragraph.
I'm trying to display a span overlapping a canvas element along the canvas' left
I'm trying to create a dynamic tag with absolute positioning. In my trial runs
I have two elements that I am trying to line up, a text box

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.