467,910 Members | 1,561 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,910 developers. It's quick & easy.

several divs / float:left

Hello,

I am using JavaScript to create a div element as container for severeal
other div elements (children). I want those children to appear side-by-side
within the container, so I've set the childrens style to 'float:left' using
JavaScript. There is room to more than 3 of those children per row.

Unfortunately they do not appear side-by-side but each in an own row. The
parent styles are all to default (no explicitly settings).

What might cause that behavior?

Regards,

Oliver

Dec 18 '06 #1
  • viewed: 1595
Share:
1 Reply
Oliver Block wrote:
What might cause that behavior?
mydiv.style.float = "left";

does seemingly not set the style attribute like

<div style="...float:left;..."...>

All other elements are set properly though!?!

Adding a style element to the document helps.

Regards,

Oliver

Dec 18 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Jeff Thies | last post: by
reply views Thread by vytas | last post: by
5 posts views Thread by Gozil | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.