I want to float add my recent posts to show in sidebar widgets

I want to float add my recent posts to show in sidebar widgets. Is there any code to do so? I need html+ CSS codes to do it.
Can anyone please provide me?
Thanks