Accigueunasia
New Member
I am trying to align a \[code\]span\[/code\] to the right of an \[code\]a\[/code\] element without pushing it onto another line and without manually setting the width of the containing \[code\]div\[/code\].I have tried all sorts of combinations of \[code\]white-space\[/code\],\[code\]position\[/code\],\[code\]float\[/code\],\[code\]text-align\[/code\] 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