On 11/15/06, Bradley Wright <[EMAIL PROTECTED]> wrote:
> Wes Gamble wrote:
> >     newDiv = popup.document.createElement('div');
> >     newDiv.setAttribute('id', 'pdf');
> >     newDiv.setAttribute('style', 'margin-top: 250px; text-align: center;');
> >     newDiv.innerHTML = 'Please wait while your forms are 
> > generated<BR/><BR/><IMG src="' + wait_image_url + '"/>';
> >     popup.document.body.appendChild(newDiv);
>
> I'd do it like this:
>
> newDiv.style.marginTop = '250px';
> newDiv.style.textAlign = 'center';

It is an option. I'd do a

#pdf {margin-top: 250px; text-align: center;}

in the CSS file :-)

If #pdf normally has other styles you can also add a class with

newDiv.className = 'pop';

and set the CSS accordingly. Whenever you get the chance to let the
CSS parser do the work for you, do it.


-- 
Chris Heilmann
Book: http://www.beginningjavascript.com
Blog: http://www.wait-till-i.com
Writing: http://icant.co.uk/
______________________________________________________________________
css-discuss [EMAIL PROTECTED]
http://www.css-discuss.org/mailman/listinfo/css-d
IE7 information -- http://css-discuss.incutio.com/?page=IE7
List wiki/FAQ -- http://css-discuss.incutio.com/
Supported by evolt.org -- http://www.evolt.org/help_support_evolt/

Reply via email to