Yet, the true reason should be that you can't manipulate an elements css before it becomes a DOM member. Eventhough, -you should! ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Troy III progressive art enterprise ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ >From: "Laurent Muchacho" <elmuchacho at gmail.com> >Reply-To: "\[JavaScript List\]" <javascript at LaTech.edu> >To: "[JavaScript List]" <javascript at latech.edu> >Subject: Re: [Javascript] style on created div element >Date: Thu, 13 Apr 2006 10:19:40 +0100 > >Hi Michael, > >On some occasion you will have to apply the style after the div is appended >to the document. >It did append to me before and this was the way to resolve it. > >Try this > >var Div = document.createElement("DIV"); > cell.appendChild(Div); > Div.style.display = "none"; > >However on the examples below as you can see there is no difference bettwen >both >http://www.be-lovely.co.uk/examples/div/index.htm > >An other reason might be that the created element will inherit the css >style >from the parent object > >Happy programming > >Laurent > > > >On 4/12/06, Michael Borchers <list at tridemail.de> wrote: > > > > var Div = document.createElement("DIV"); > > Div.style.display = "none"; > > cell.appendChild(Div); > > > > is this supposed to work? (besides the cell etc. this works fine with my > > script) > > the div created always seems to be visible:( > > > > _______________________________________________ > > Javascript mailing list > > Javascript at LaTech.edu > > https://lists.LaTech.edu/mailman/listinfo/javascript > > > > > > >_______________________________________________ >Javascript mailing list >Javascript at LaTech.edu >https://lists.LaTech.edu/mailman/listinfo/javascript _________________________________________________________________ Express yourself instantly with MSN Messenger! Download today - it's FREE! http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/