![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||||||||
| |||||||||
|
|
.extlink { background: url(http://tc2.atspace.com/extlink.gif) no-repeat right middle; |
|
padding-right: 12px; } A class=extlink href=zzz>WHATEVER</A |
|
I want to open C:\test.htm directly from my hard disk, to see how the background image looks, before I change my actual website. Problems: (1) IE6 only displays the background image if I remove the DOCTYPE declaration. If I retain that declaration, it does not display that image, even though it still obeys the other aspects of the 'extlink' style. |
|
Adding or removing an IE6 "mark of the web" (MOTW) has no affect on this, one way or the other. |
|
(2) FireFox 1.5 does not display the image at all - with or without the DOCTYPE declaration. |
|
Questions: (1) Why does the DOCTYPE stop IE6 displaying the image? |
|
(2) Why doesn't FF display the image at all? |
|
(3) What should I do to resolve this, to enable local testing of the files on my hard disk? |
|
I realize that it will probably all work fine, when I copy all of the relevant files to my web host. But I want to know why it *doesn't* work fine when I run them locally on my PC. Generally I like to test my changes locally, before I copy them to my web host. |
#2
| |||
| |||
|
|
TC wrote: Problems: (1) IE6 only displays the background image if I remove the DOCTYPE declaration. If I retain that declaration, it does not display that image, even though it still obeys the other aspects of the 'extlink' style. Usually that means that you've done something wrong in the code, which IE will "forgive" if you have it in Quirksmode, since in Quirksmode it doesn't "have to" follow the W3C guidelines. Add the doctype, then *validate your code*, and fix the errors. If then still IE doesn't show your background, come asking and show an online example of what it is that's not working. |
|
Adding or removing an IE6 "mark of the web" (MOTW) has no affect on this, one way or the other. What *is* a mark of the web? |
#3
| |||
| |||
|
|
Yes, good idea to validate first. I'll try that now. But I suspect that there is no point putting an example online - it will almost certainly *work* online :-) |
|
Adding or removing an IE6 "mark of the web" (MOTW) has no affect on this, one way or the other. What *is* a mark of the web? IE executes local files (C:/blah.test) under the security restrictions of the Local zone. In days gone by, the Local zone had *less* restrictions than the Internet zone. So local files were *more capable* than remote ones. Now days, the Local zone has *more* restrictions than the Internet zone, so local files are (by default) *less* capable than remote ones. This gves problems if you want to test your files locally - they'll have *less* capablity than when you put them on your server! The MOTW is a special HTML comment which, if included in an HTML file, says to IE: "execute this file under the security restrictions of the Internet zone, not the Local zone". This lets you test your files "as if" they were actually on the web. Despite what many people seem to think, the MOTW feature is not a security hole, of any descripton. |
#4
| |||
| |||
|
|
Els wrote: TC wrote: Problems: (1) IE6 only displays the background image if I remove the DOCTYPE declaration. If I retain that declaration, it does not display that image, even though it still obeys the other aspects of the 'extlink' style. Usually that means that you've done something wrong in the code, which IE will "forgive" if you have it in Quirksmode, since in Quirksmode it doesn't "have to" follow the W3C guidelines. Add the doctype, then *validate your code*, and fix the errors. If then still IE doesn't show your background, come asking and show an online example of what it is that's not working. Yes, good idea to validate first. I'll try that now. But I suspect that there is no point putting an example online - it will almost certainly *work* online :-) |
#5
| |||
| |||
|
|
Yes, good idea to validate first. I'll try that now. But I suspect that there is no point putting an example online - it will almost certainly *work* online :-) Ok, I just validated my file C:/test.htm at http://validator.w3.org/. It objected (rather obscurely) to the missing TITLE element. I added TITLE>blah</TITLE> to the HEAD element, and now it validates as: "This Page Is Valid HTML 4.01 Transitional!". I re-checked what I said in my original post, and it is still the same. The DOCTYPE element stops the background mage from rendering when I run the HTML file from my hard disk :-( Any ideas why? |
#6
| |||
| |||
|
|
TC wrote: Yes, good idea to validate first. I'll try that now. But I suspect that there is no point putting an example online - it will almost certainly *work* online :-) I don't see why. Really, if the doctype is what makes the difference, that proves it's not a misplaced image file or anything. So if it works locally without doctype, and not with a doctype, the same will be the case on the web. |
|
The MOTW is (snip) Never heard of it, and never had a problem with HTML files locally, even if I open them as local files instead of serving them as webpages. I suppose this only comes into play when using scripts and stuff, not plain HTML and CSS. |
#7
| |||
| |||
|
|
Can you put the example online? |
#8
| |||
| |||
|
|
TC wrote: .extlink { background: url(http://tc2.atspace.com/extlink.gif) no-repeat right middle; Make that right center. |
#9
| |||
| |||
|
|
Els wrote: TC wrote: Problems: (1) IE6 only displays the background image if I remove the DOCTYPE declaration. If I retain that declaration, it does not display that image, even though it still obeys the other aspects of the 'extlink' style. Usually that means that you've done something wrong in the code, which IE will "forgive" if you have it in Quirksmode, since in Quirksmode it doesn't "have to" follow the W3C guidelines. Add the doctype, then *validate your code*, and fix the errors. If then still IE doesn't show your background, come asking and show an online example of what it is that's not working. Yes, good idea to validate first. I'll try that now. But I suspect that there is no point putting an example online - it will almost certainly *work* online :-) Adding or removing an IE6 "mark of the web" (MOTW) has no affect on this, one way or the other. What *is* a mark of the web? IE executes local files (C:/blah.test) under the security restrictions of the Local zone. |
|
In days gone by, the Local zone had *less* restrictions than the Internet zone. So local files were *more capable* than remote ones. Now days, the Local zone has *more* restrictions than the Internet zone, so local files are (by default) *less* capable than remote ones. |
#10
| |||
| |||
|
|
What *is* a mark of the web? |
![]() |
| Thread Tools | |
| Display Modes | |
| |