wow thanks... that fixed that, the second span miss...
thanks for the tip ;)

On Sep 9, 4:18 am, "Michael Geary" <[EMAIL PROTECTED]> wrote:
> There are a few problems in your markup:
>
> 1) action"" is missing the =
>
> 2) FORM is a block level element; you can't nest it inside a SPAN
>
> 3) Missing end tag for the second SPAN
>
> I suggest pasting the markup into the body of an HTML 4.01 document and 
> running it through the W3C validator:
>
> http://validator.w3.org/
>
> Then you should have better luck with it.
>
> Also, the \/ isn't necessary. It won't cause any problem, but you can use / 
> in this code to keep it simpler. If you are writing a
> </script> tag inside a JavaScript string that is in an HTML file, then you 
> need to use the \/ or else break up the string so it
> doesn't end your script. But for other tags it doesn't matter.
>
> One last tip - instead of a big long string all on one line, I like to write 
> long HTML strings like this:
>
>    var html = [
>       '<div>',
>          'Hello ',
>          '<span>',
>             'World',
>          '</span>',
>       '</div>'
>    ].join('');
>
> This lets me write the HTML in a more readable fashion, and the [].join('') 
> is very fast.
>
> -Mike
>
> > From: Equand
>
> > i have a code like
> >                    $('<div
> > class="magic"></div>').html('<span><br \/>??????? ????? ?
> > ??????<br \/><br \/><form action"" method="get"><input name="login"
> > type="text" value="login" size="10" maxlength="10" \/
> > >&nbsp;&nbsp;<input name="password" type="password" value="password"
> > size="10" maxlength="10" \/><\/form><br \/><\/span><span
> > class="theone2"><a href="submit">?????????<\/a><br \/><br \/
> > >').appendTo('body');
> >                    s = windowsize(2);
> >                    k =
> > (+$('.magic').css("width").replace(/px$/,''));
> >                    s = (s[0] - k) / 2;
> >                    $('.magic').css("left",s);
>
> > it creates a div centered on the screen with login and
> > password fields...
> > it works in firefox... but in ie6/ie7 it shows only text in
> > last span... what's wrong with this?

Reply via email to