Post #191,013
1/20/05 5:37:50 PM
|
#$&@#$ IE
Discovered something annoying and interesting today while going over some HTML to work out small display problems, mostly small differences between Firefox/Mozilla and IE. IE actually displays the following two rows differently. The first gets a pixel or two empty space below the image. \n<tr>\n <td class="layoutCell">\n <img src="images/welcome_banner.jpg">\n </td>\n</tr>\n<tr>\n <td class="layoutCell"><img src="images/welcome_banner.jpg"></td>\n</tr>\n I'm not sure if this is a violation of HTML standards or not, but it is stupid behavior. If I wanted space below the image, I would put a break in there. Jay
|
Post #191,015
1/20/05 6:11:07 PM
|
White space should have been trimmed
Well, in IE, only the first two have no padding. In Firefox, the last one has padding on the top. \n<table border='1' cellspacing='0' cellpadding='0'>\n <tr><td><img src='http://z.iwethey.org/forums/images/lrpd.gif'></td></tr>\n <tr><td> <img src='http://z.iwethey.org/forums/images/lrpd.gif'></td></tr>\n <tr><td><img src='http://z.iwethey.org/forums/images/lrpd.gif'> </td></tr>\n <tr><td> <img src='http://z.iwethey.org/forums/images/lrpd.gif'> </td></tr>\n <tr><td>\n <img src='http://z.iwethey.org/forums/images/lrpd.gif'>\n </td></tr>\n</table>\n [image|http://z.iwethey.org/forums/images/lrpd.gif||||] | [image|http://z.iwethey.org/forums/images/lrpd.gif||||] | [image|http://z.iwethey.org/forums/images/lrpd.gif||||] | [image|http://z.iwethey.org/forums/images/lrpd.gif||||] | [image|http://z.iwethey.org/forums/images/lrpd.gif||||] |
|
Post #191,021
1/20/05 8:19:26 PM
|
Scratch that comment about Firefox.
That space was just a function of the way zIWETHEY inserts line breaks. The comments about IE though are still applicable.
|
Post #191,023
1/20/05 9:16:38 PM
|
IE is wrong
[link|http://www.w3.org/TR/html401/appendix/notes.html#notes-line-breaks|W3.org] SGML (see [ISO8879], section 7.6.1) specifies that a line break immediately following a start tag must be ignored, as must a line break immediately before an end tag. This applies to all HTML elements without exception. The HTML standard is actually a bit uncertain about what should be done with spaces in this case, but it clearly states that a line break both after a tag start and before a tag end must be dropped. Just another one of those annoying little inconsistencies to work around. Jay
|
Post #191,030
1/20/05 10:36:02 PM
|
Firefox beats Internet Explorer...
...in all the [link|http://www.bbspot.com/News/2005/01/firefox_vs_internet_explorer.html|important matters].
|
Post #191,032
1/20/05 11:10:45 PM
|
I'm convinced!
|
Post #191,099
1/21/05 3:19:39 PM
|
you had me at hello.
If you push something hard enough, it will fall over. Fudd's First Law of Opposition
[link|mailto:bepatient@aol.com|BePatient]
|
Post #191,016
1/20/05 6:11:32 PM
|
You have whitespace in the first version
Don't necessarily know how browsers will handle that-all, but enters in source code are the same as spaces -- as far as HTML goes. How does IE display the following: <tr>\n <td class="layoutCell"> <img src="images/welcome_banner.jpg"> </td>\n</tr> I bet it's the same as the first (with the CR's.)
-YendorMike
"They that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." - Benjamin Franklin, 1759 Historical Review of Pennsylvania
|
Post #191,447
1/24/05 9:02:30 PM
|
What do you have for a DOCTYPE declaration on that page?
And if it's XHTML, are you using an XML prolog before it?
-- You cooin' with my bird? [link|http://www.shtuff.us/|http://www.shtuff.us/]
|
Post #191,532
1/25/05 11:47:56 AM
|
HTML 4.01 transitional / loose
Not the most update to date stuff, but I'm working with an exsiting code base.
It's also littered with tables on the kind of scale to frighten anybody that looks at the source.
Jay
|
Post #191,539
1/25/05 12:13:55 PM
|
Re: HTML 4.01 transitional / loose
--\r\nYou cooin' with my bird? \r\n[link|http://www.shtuff.us/|shtuff]
|
Post #191,563
1/25/05 2:28:45 PM
|
Not yet, it's still in testing
|