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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T03:23:52+00:00 2026-06-18T03:23:52+00:00

I am trying to align a span to the right of an a element

  • 0

I am trying to align a span to the right of an a element without pushing it onto another line and without manually setting the width of the containing div.

I have tried all sorts of combinations of white-space,position,float,text-align etc, but I simply cannot get this to work.

Here is an example of the issue:

http://jsfiddle.net/QgzbY/2/

Notice the ‘Ctrl+Shift+S’ is on the line below ‘Save Document As’, I want this to be on the same line, aligned to the right like the line above. In other words, it needs to increase the width on the containing element in order to fit the shortcut text.

Question in short: How can I float an element to the right of a parent element, whilst always keeping the contents on one line?

If this cannot be achieved using CSS, then please don’t waste your time helping me with the Javascript as there are many more people on the Stack that need help and I can write this part myself. I was just hoping it wouldn’t be necessary 🙂

  • 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-18T03:23:53+00:00Added an answer on June 18, 2026 at 3:23 am

    Thank you for all of your answers. Unfortunately, it seems that what I was trying to achieve is not possible without manipulating the widths of the menus. I thought this might be the case 🙁

    Thanks anyway for all your tips

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

Sidebar

Related Questions

I am trying to vertically align a SPAN element in the middle of a
I am trying to align a part of text to the right and the
Imagine the following illustrative HTML: <form> <div class=line> <label class=lbt for=name>Name:</label> <span class=obr>*</span> <input
Is there some easy way to align stuff in div containers to the right
I'm trying to align a image with text on its right. I also wanted
I'm trying to place images from a div to a span . The result
I am trying to center align an image that is wrapped in a <span>
I am trying to increase the width of the span tag within a list
I'm trying to align a button to the right, whereas some other text is
I have been trying to align an entire label along with text to the

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.