How to reserve a DIV width with “left:100%” CSS rule

If placing an absolute position with left:100%, the DIV will not reserve the normal width depending on its content. Instead, the width will be minimized by breaking the text over spaces.

Here is a simple EXAMPLE

How is it possible to place an absolute position with left:100% (which is located just outside the parent), but keeping the DIV content (text) in one line.

Note that the text length and DIV width are unknown, as the width must be set according to the inner content.


If all you want is for your absolute div to have his text on one line you can put:



Is this what you're after?

You have two options:

In your .test style you can either add a white-space:nowrap; or width:100%; works too

Need Your Help

Change UITabbar tint colors from more menu in iOS8

ios8 tabbar tintcolor

I'm trying to change the blue colour from icons in the more menu. I tried almost everything I found on StackOverflow, but nothing worked on iOS 8.

Mixing named and unnamed fields in records in Haskell

haskell field record

Is it possible in Haskell to mix named and unnamed fields in records? Every example I see uses either all named or all unnamed fields like: