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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T05:13:37+00:00 2026-05-14T05:13:37+00:00

if i remove a.three display block this shows up fine. However what i want

  • 0

if i remove a.three display block this shows up fine. However what i want is the X to be at the right side. I tried float: right but it puts the x on the next line. How do i get the X on the same line? Here is some code.

html

<body>
    <ul>
        <li><nobr>
            <a href="/a" class="one">a</a>
            <a href="/b" class="two">b</a>
            <a href="/c" class="three">c</a>
            </nobr></li>
    </ul>
</body>

Css

li a
{
    display: inline;
    background:red;
}
li a.two
{
    background:teal;
}

li a.three
{
    display: block;
    background:green;
}

-edit- I forgot to mention. All of the green must be clickable as the original and which is why i have the 3rd link as a block. All current solution does not have the green clickable. NOTE: I think i can change the javascript code to fix this BUT i dont know if css or js is the better solution. The code is inside a demo i modified from SoundManager which tweaks elements inside of the li

  • 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-14T05:13:37+00:00Added an answer on May 14, 2026 at 5:13 am

    When you add float to an element is forces display: block;. Since your a.three is also display:block it forces the second div down a line.

    I’m not 100% convinced I like this solution, but… Add position: relative; to the parent li making it a positioning container, and then use absolute positioning on .div2

    Updated code

    li 
    {
        width:100%;
        position: relative;
    }
    li a.one
    {
        float:left;
        background:red;
    }
    li a.two
    {
        float:left;
        background:pink;
    }
    
    li a.three
    {
        display:block;
        background:green;
    }
    .div2
    {
        position: absolute;
        top:0px;
        right: 0px;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

var item = $('li > a', $(MENU_ELEMENT)); item.focus(function(event){ $(this).siblings('ul').css('display', 'block'); $(this).parents('ul > li >
In IE8 block elements with a set width/height will display properly but mouse events
Is it possible to remove or cut away sections of shapes in Three.js? For
I am using .ui-helper-clearfix { display: inline-block; } in jquery_custom_datatable.css and jquery-ui-1.8.12.custom.css while fixing
This is a common question but I have a slight twist to it so
I have the following code (snippets) in my website: The CSS: #something li{ display:block;
What is a good way to remove the code from display pages when developing
This page shows two images, each contained inside a separate span displayed as an
I want to remove the clearfix class from my HTML and include a clearfix
Is there any way to remove all forgeinKey and primary key contriants from Database

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.