WSS Forum

Ask Question   UnAnswered
Home » Forum » WSS       RSS Feeds

wss site problem with JS

  Asked By: Brendon    Date: May 04    Category: WSS    Views: 1224

The default.aspx pages contains <img src="jpg"> as header/banner. I wanted
to test the screen height and width, So I put the img in a javascript with
document.write('<img src="jpg">); [also tried with document.writeln) there
is gap(around 1cm) appears between the image and the below area. I am
surprising why? if I remove the JavaScript and add the img directly works
fine. but adding JavaScript will gives gaps! can anybody know the issue?



1 Answer Found

Answer #1    Answered By: Alonzo Richard     Answered On: May 04

As a standard practice, I always follow any <img> tag with a on the
same line. It isn't necessary if you have another closing tag immediately
follow the <img> tag but I always try to do it as a matter of course. I also
always include a border value. Try it, you may be surprised.

So, the final HTML should look like this:
<img src="jpg" border="0">


<img src="jpg" border="0"></td>

I'm not sure why IE renders this way, but it has for several versions. But
now you know why VS.NET always moves the ending tags to the immediate right
of the last item in the last cell. Very frustrating but a totally different

Didn't find what you were looking for? Find more on wss site problem with JS Or get search suggestion and latest updates.