yeeha1
yeeha1

Reputation: 569

div with fixed positioning and float

I have the following code:

http://jsfiddle.net/dbg5X/

Is it possible to have the second div to be in a fixed position and to have it float to the right?

Thanks,

Upvotes: 0

Views: 163

Answers (2)

Will Martin
Will Martin

Reputation: 4180

Floating and positioning are two totally different models for arranging stuff on the screen, and they don't mix.

Try putting right: 10px on the second div.

Upvotes: 1

shinkou
shinkou

Reputation: 5154

No, you can't have a single element at a fixed position and float at the same time because float means not having a fixed position.

Upvotes: 0

Related Questions