473,781 Members | 2,729 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Extra Space in IE - The Sequel

I have another table layout that looks good in all the browsers I've
tested it in *except*, once again, IE on the PC. In IE there's extra
space around some of the table cells making up the layout. Apparently,
the problem lies with the bit of javascript I've used to randomly
display a photo on the page. If I take the javascript out, the pieces
of the layout fit together seamlessly. Put the javascript back in and
gaps appear.

Here's the line of code:
<td colspan="2"><sc ript type="text/javascript"
src="random_hea der.js"></script><noscrip t><img src="images/random1.jpg"
width="268" height="275" alt="Polaroid of Kilee"></noscript></td>

And here's the page:
http://www.kileecooper.com

Any clue why the addition of a javascript reference would add space
around the layout?

Thanks.

-Ray

Jun 21 '06 #1
10 2455
In message <11************ *********@c74g2 000cwc.googlegr oups.com>,
fl******@comcas t.net writes
I have another table layout that looks good in all the browsers I've
tested it in *except*, once again, IE on the PC. In IE there's extra
space around some of the table cells making up the layout. Apparently,
the problem lies with the bit of javascript I've used to randomly
display a photo on the page. If I take the javascript out, the pieces
of the layout fit together seamlessly. Put the javascript back in and
gaps appear.

Here's the line of code:
<td colspan="2"><sc ript type="text/javascript"
src="random_he ader.js"></script><noscrip t><img src="images/random1.jpg"
width="268" height="275" alt="Polaroid of Kilee"></noscript></td>


The HMTL of the page looks like this here.

<SCRIPT src="The Kilee Cooper Website_files/random_header.j s"
type=text/javascript></SCRIPT>
<NOSCRIPT><IM G height=275 alt="Polaroid of Kilee"
src="The Kilee Cooper Website_files/random1.jpg"
I'm not splitting hairs, though. Just pointing out that </SCRIPT> and
<NOSCRIPT> need to be next to each other, like so:

<SCRIPT src="The Kilee Cooper Website_files/random_header.j s"
type=text/javascript></SCRIPT><NOSCRIP T><IMG height=275
alt="Polaroid of Kilee"
src="The Kilee Cooper Website_files/random1.jpg"
And remove the "\n" from the random_header.j s file, so:

document.write( programs[index] + "\n");

becomes:

document.write( programs[index]);

--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124
Jun 21 '06 #2
> And remove the "\n" from the random_header.j s file...<

Martin, you da man! Removing that "/n" did the trick! Thank you!
What the heck was that supposed to do, anyway?

On a side note, the other items you mentioned, like having the <script>
and <noscript> together, etc., it must be an issue of whatever you used
to view the source code, as the actual code does do just that. Here's
the code as it appears in the HTML document:

<script type="text/javascript"
src="random_hea der.js"></script><noscrip t><img src="images/random1.jpg"
width="268" height="275" alt="Polaroid of Kilee"></noscript>

But hey, bottom line is you fixed the problem! Many many thanks! :D

Jun 21 '06 #3
fl******@comcas t.net wrote:
And remove the "\n" from the random_header.j s file...<
Martin, you da man! Removing that "/n"


\n, not /n
did the trick! Thank you!
What the heck was that supposed to do, anyway?


Exactly what it did. In all the character strings of all C-like
languages including Javascript, \n = new line, \r = carriage return, \t
= tab, \f = form feed, etc.
Jun 21 '06 #4
In message <11************ **********@r2g2 000cwb.googlegr oups.com>,
fl******@comcas t.net writes
And remove the "\n" from the random_header.j s file...<
Martin, you da man! Removing that "/n" did the trick! Thank you!
Pleased to help. :)
What the heck was that supposed to do, anyway?
\n is new line.
On a side note, the other items you mentioned, like having the <script>
and <noscript> together, etc., it must be an issue of whatever you used
to view the source code


Oh, that's odd. But as you say, it may have been added by one of the
applications I use. :(
--
Martin Jay
Phone/SMS: +44 7740 191877
Fax: +44 870 915 2124
Jun 22 '06 #5
I've resisted until now, but I want to bring up the following point.

Isn't is the case that the HTML specs state that consecutive whitespace
characters (which includes space chars, newlines, carriage returns, ASCII
char 255 etc etc) are to be collapsed to a single whitespace character for
display? I ran into the case where IE (correctly) puts spaces around
each of consecutive <img ...> tags where the HTML source is formatted,
quite naturally for readability, with the tags in separate lines. I had to
turn this:

<table><tr>
<td>
<img src="/images/1.gif>
<img src="/images/2.gif>
</td>
</tr></table>

into this:

<table><tr>
<td><img src="/images/1.gif><img src="/images/2.gif></td>
</tr></table>

in order to eliminate the spaces around the images (in IE).

I have always seen this as one area where IE is correct in its
implementation and browers which DWYM and remove the spaces are in fact
silently changing your source, something MICROS~1 is vilified for
regularly.

Just a thought, corrections appreciated.

Rich
Jun 22 '06 #6
On Thu, 22 Jun 2006, Richard Gration wrote:
Isn't is the case that the HTML specs state that consecutive whitespace
characters (which includes space chars, newlines, carriage returns, ASCII
char 255 etc etc) are to be collapsed to a single whitespace character for
display?
Er, yes, but surely that's not your immediate point...?

/
In order to avoid problems with SGML line break rules and
inconsistencies among extant implementations , authors should not rely
on user agents to render white space immediately after a start tag or
immediately before an end tag.
\
http://www.w3.org/TR/REC-html40/struct/text.html#h-9.1
I ran into the case where IE (correctly) puts spaces around
each of consecutive <img ...> tags where the HTML source is formatted,
quite naturally for readability, with the tags in separate lines.
Let's not get side-tracked by whether this is "correctly" . We have
to code for the browsers that are out there, not for some ideal
SGML-conforming user agent.
I had to turn this: .... into this:

<table><tr>
<td><img src="/images/1.gif><img src="/images/2.gif></td>
</tr></table>

in order to eliminate the spaces around the images (in IE).
You're aware that inserting linebreaks inside the tags is harmess?
If you want to break lines up for source code readability, you can
have e.g:

<td><img src="/images/1.gif<img src="/images/2.gif
</td>
and get the same results.

Routine whine: you need alt attributes with your img tags. Again
these could usefully be broken for source readability, a la:

<td><img src="/images/1.gif
alt="providing a meaningful text mode alternative for the purpose 1"<img src="/images/2.gif alt="providing a meaningful text mode alternative for the purpose 2"</td>
but from past experience I would advise against line breaks inside
alt= strings (and title= strings and so on).
I have always seen this as one area where IE is correct in its
implementation and browers which DWYM and remove the spaces are in
fact silently changing your source, something MICROS~1 is vilified
for regularly.


See
http://www.w3.org/TR/REC-html40/appe...es-line-breaks
before reaching a final conclusion.
Jun 22 '06 #7
On Thu, 22 Jun 2006, Richard Gration wrote:
(which includes space chars, newlines, carriage returns,
ASCII char 255 etc etc)


What?

Jun 22 '06 #8
On Thu, 22 Jun 2006, Andreas Prilop wrote:
On Thu, 22 Jun 2006, Richard Gration wrote:
(which includes space chars, newlines, carriage returns,
Oh yes, syntactic white space is defined in
http://www.w3.org/TR/REC-html40/struct/text.html#h-9.1
ASCII char 255 etc etc)


What?


well spotted! I must have been asleep when I commented before.

255 is neither ASCII nor white space.

As well as being high on the long-standing Prilop hit-list (not far
below the Belgian code translation table...). SCNR.
Jun 22 '06 #9
On Thu, 22 Jun 2006 14:38:32 +0100, Alan J. Flavell wrote:
On Thu, 22 Jun 2006, Richard Gration wrote:
Isn't is the case that the HTML specs state that consecutive whitespace
characters (which includes space chars, newlines, carriage returns,
ASCII char 255 etc etc) are to be collapsed to a single whitespace
character for display?
Er, yes, but surely that's not your immediate point...?


I was stating it to give context to what follows.
/
In order to avoid problems with SGML line break rules and inconsistencies
among extant implementations , authors should not rely on user agents to
render white space immediately after a start tag or immediately before an
end tag.
\
http://www.w3.org/TR/REC-html40/struct/text.html#h-9.1
I didn't know the SGML "must" about whitespace which you
reference at the end of this reply. While I appreciate the point you make
here, the contrapositive (I think that's the term) is my main point:
Authors should rely on user agents not to render whitespace after a start
tag or before an end tag if no whitespace is present.
We have to
code for the browsers that are out there, not for some ideal
SGML-conforming user agent.


Heh. Surely the biggest source of pain (or one of) in writing documents
for user agents.

<SNIP fair comments>
I have always seen this as one area where IE is correct in its
implementation and browers which DWYM and remove the spaces are in fact
silently changing your source, something MICROS~1 is vilified for
regularly.


See
http://www.w3.org/TR/REC-html40/appe...es-line-breaks
before reaching a final conclusion.


Interesting. However ...

There are 3 whitspace regions in:

<td>
<img ...>
<img ...>
</td>

Your reference deals with the outer 2, and everything you have mentioned
leads inexorably to the conclusion that the only situation in which
authors can rely on UAs not rendering whitespace between the images is if
there really is no whitespace between the tags. I'm wondering if <img
..../> (hence <img ...></img>) has relevance here, but I can't see it
myself.

The subject of the OP could (should?) be stated "missing space in all but
IE".

Rich
Jun 22 '06 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
2727
by: GJones | last post by:
Is there away to capture a session variable value from IIS and use it in a SQL 2000 trigger with out passing it as a part of a string query. I just want to capture it somehow systemically. Thanks, Greg
0
1299
by: Mike Doanh Tran | last post by:
Hi all, Does anyone have any suggestion for converting a Sequel database to MYSQL? I just want to copy a Sequel database data to a Mysql one. Thanks in advance for any suggestion, Mike --
5
4135
by: Brian | last post by:
Hello group, http://people.umass.edu/btrembla/ (html 4.01/strict) uses a conventional menu marked up as a list, and css http://people.umass.edu/btrembla/css/brian.css http://people.umass.edu/btrembla/css/screen.css to enhance their appearance. I added
1
2067
by: Matt Bush | last post by:
Using .NET Framework 1.1 and Visual Studio .NET 2003. Language is VB.NET. When loading an XML String using XMLDocument.LoadXml we are getting an extra space inserted into abbreviated end tags: objXmlDoc.XmlResolver = Nothing objXmlDoc.LoadXml(XmlData) .... .... objXmlDoc.InnerXml (gets written to database)
5
3003
by: Ian | last post by:
Can anyone give me advice on migrating my Access backend to sequel server? I am sure there are discussion groups and documentation for this but don't know where to look. I am looking for answers to general questions such as: Will my VBA still work? What is the migration procedure?
5
1934
by: dw | last post by:
hello - first, let me state that i am an Asp.Net rookie. here is the situation: i have a page that looks good in the vs.net designer, but when the page renders there are extra amounts (vertically) of space between controls. i have all of the controls in a table, to help line them up, and I have reviewed the html to verify that there are no extra spaces or paragraphs or breaks between the controls. however, when i run the web site,...
2
2156
by: djoefish | last post by:
sequel to the topic "install patch on windows"..... I am currently running Python2.3 with Enthought on a windows PC. I have been running into a memory problem (see http://evanjones.ca/python-memory-part3.html), and would like to install a patch. I have read a lot about it online, but can't seem to find out how to do so on windows. I have a 'patch' program that works, but it only patches the source file 'obmalloc.c', which does not...
8
1997
by: dancer | last post by:
Using ASP.net 1.1 to create user input form. When I put a RequiredFieldValidator I have extra space at the bottom of the cell, as if I had put a <br>. When I comment out the RequiredFieldValidator, the extra space goes away. Don't want that extra space, but want the validator. What can I do?
4
3378
by: kkshansid | last post by:
i have a database as table name school field name location eg in location column data green school,tagore garden,chink road,jammu i want to make search on location such that when user enter green green school, tagore search words should come continous problem
0
9474
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10308
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10076
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8964
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7486
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6729
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5375
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4040
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.