# Floating a JS made div

**URL:** https://forum.kirupa.com/t/floating-a-js-made-div/292008
**Category:** Uncategorized
**Created:** [July 8, 2009, 11:11pm UTC](https://forum.kirupa.com/t/floating-a-js-made-div/292008 "2009-07-08T23:11:20Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![bardic](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/bardic/32/3708_2.png) [@bardic](https://forum.kirupa.com/u/bardic)
#### Post date: [July 8, 2009, 11:11pm UTC](https://forum.kirupa.com/t/floating-a-js-made-div/292008/1 "2009-07-08T23:11:20Z")

</div>

Sup all?  
Pretty new to JS here so forgive me if this is a really dumb question but I’m having no luck finding an answer. I am making some divs with js and the short of it is I want em to float to the left.

I’ve tried this :

document.getElementById(“tile” + i).style.float = ‘left’;

and

newDiv.style.float = ‘left’;

but neither have worked. Can anyone point out what I’m doing wrong?  
Thanks
