473,771 Members | 2,347 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

DOCTYPE / background-image madness!

TC
Hi folks

I want to enhance my website to distinguish "external" hyperlinks from
"internal" ones.

With that aim, I've written the following two small files for testing
purposes:

C:\styles.css:

.extlink {
background: url(http://tc2.atspace.com/extlink.gif) no-repeat
right middle;
padding-right: 12px; }

C:\test.htm:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<HTML>
<HEAD>
<LINK REL=StyleSheet HREF="styles.cs s" TYPE="text/css">
</HEAD>
<BODY>
<A class=extlink href=zzz>WHATEV ER</A>
</BODY>
</HTML>

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.

TIA,
TC (MVP MSAccess)
http://tc2.atspace.com

Jul 24 '06
24 3782
TC

Harlan Messinger wrote:
TC wrote:
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.

Oh? I've observed the opposite, and this would make no sense, the whole
point being that you trust your own resources more than you trust other
people's.
No, I believe that I'm right. Check the link Ed Mullen posted. "The
role of the MOTW is more prominent with Internet Explorer 6 for
Microsoft Windows XP Service Pack 2 (SP2) because of increased security
restrictions in the Local Machine zone. When you are developing Web
content, the MOTW enables you to test your active HTML documents in the
security zone where you intend the pages to run" [instead of in the
increased security restrictions of the Local Machine zone]

Cheers,
TC (MVP MSAccess)
http://tc2.atspace.com

Jul 25 '06 #21
TC

TC wrote:
Harlan Messinger wrote:
TC wrote:
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.
Oh? I've observed the opposite, and this would make no sense, the whole
point being that you trust your own resources more than you trust other
people's.

No, I believe that I'm right. Check the link Ed Mullen posted. "The
role of the MOTW is more prominent with Internet Explorer 6 for
Microsoft Windows XP Service Pack 2 (SP2) because of increased security
restrictions in the Local Machine zone. When you are developing Web
content, the MOTW enables you to test your active HTML documents in the
security zone where you intend the pages to run" [instead of in the
increased security restrictions of the Local Machine zone]
For example, here is one of many posts on the issue. It shows it well,
from a user perspective: (absurdly long URL follows)
http://groups.google.com/group/micro...505e0b171cf2a8

Cheers,
TC (MVP MSAccess)
http://tc2.atspace.com

Jul 25 '06 #22
TC

TC wrote:
TC wrote:
Harlan Messinger wrote:
TC wrote:
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.
>
Oh? I've observed the opposite, and this would make no sense, the whole
point being that you trust your own resources more than you trust other
people's.
No, I believe that I'm right. Check the link Ed Mullen posted. "The
role of the MOTW is more prominent with Internet Explorer 6 for
Microsoft Windows XP Service Pack 2 (SP2) because of increased security
restrictions in the Local Machine zone. When you are developing Web
content, the MOTW enables you to test your active HTML documents in the
security zone where you intend the pages to run" [instead of in the
increased security restrictions of the Local Machine zone]

For example, here is one of many posts on the issue. It shows it well,
from a user perspective: (absurdly long URL follows)
http://groups.google.com/group/micro...505e0b171cf2a8
Oops, when you've followed that link, go back to the first post in that
thread.

Cheers,
TC (MVP MSAccess)
http://tc2.atspace.com

Jul 25 '06 #23
TC wrote:
Harlan Messinger wrote:
>TC wrote:
>>In days gone by, the Local zone had *less*
restriction s 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.
Oh? I've observed the opposite, and this would make no sense, the whole
point being that you trust your own resources more than you trust other
people's.

No, I believe that I'm right. Check the link Ed Mullen posted. "The
role of the MOTW is more prominent with Internet Explorer 6 for
Microsoft Windows XP Service Pack 2 (SP2) because of increased security
restrictions in the Local Machine zone. When you are developing Web
content, the MOTW enables you to test your active HTML documents in the
security zone where you intend the pages to run" [instead of in the
increased security restrictions of the Local Machine zone]
The clearer explanation is at the bottom: "Because the Local Machine
zone has so few security restrictions, active HTML documents running on
the local machine have access to the computer's entire file system. The
MOTW aids Internet Explorer in protecting the user from the risks of
running these documents in the Local Machine zone. By referencing the
MOTW, Internet Explorer can force these Web pages into a zone that has
more restrictions, such as the Internet zone. At the same time, the MOTW
cannot be used to elevate Web pages to a zone with fewer restrictions.
Forced out of the Local Machine zone, the active content has no access
to the computer's file system."

It moves the files *into* the Internet zone = "zone that has more
restrictions", because otherwise they'd be treated as Local Machine
files with few restrictions.
Jul 25 '06 #24
TC

Harlan Messinger wrote:
TC wrote:
Harlan Messinger wrote:
TC wrote:
>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.
Oh? I've observed the opposite, and this would make no sense, the whole
point being that you trust your own resources more than you trust other
people's.
No, I believe that I'm right. Check the link Ed Mullen posted. "The
role of the MOTW is more prominent with Internet Explorer 6 for
Microsoft Windows XP Service Pack 2 (SP2) because of increased security
restrictions in the Local Machine zone. When you are developing Web
content, the MOTW enables you to test your active HTML documents in the
security zone where you intend the pages to run" [instead of in the
increased security restrictions of the Local Machine zone]

The clearer explanation is at the bottom: "Because the Local Machine
zone has so few security restrictions, active HTML documents running on
the local machine have access to the computer's entire file system. The
MOTW aids Internet Explorer in protecting the user from the risks of
running these documents in the Local Machine zone. By referencing the
MOTW, Internet Explorer can force these Web pages into a zone that has
more restrictions, such as the Internet zone. At the same time, the MOTW
cannot be used to elevate Web pages to a zone with fewer restrictions.
Forced out of the Local Machine zone, the active content has no access
to the computer's file system."

It moves the files *into* the Internet zone = "zone that has more
restrictions", because otherwise they'd be treated as Local Machine
files with few restrictions.
You missed the next statement: "Note: Windows XP SP2 applications
including Internet Explorer 6 that take advantage of the Local Machine
Zone Lockdown security feature run in an even more restricted
environment than the Internet zone."

In XP SP2, with the Local Machine lockdown, the local zone has *more*
restrictions than the Internet zone. This was an important change in
SP2.

If you don't believe me, try it yourself. Create a simple web page that
includes some javascript. Run it from your local hard disk. On XP SP2,
IE6 will ask you to confirm the script. Now add an MOTW & run it again.
Now IE6 *will not* ask, it will run the script without asking. The MOTW
moves the script from a *more* restrictive execution environment (the
Local zone), to a *less* restrictive one (the Internet one).

HTH,
TC (MVP MSAccess)
http://tc2.atspace.com

Jul 25 '06 #25

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

Similar topics

13
4221
by: CJM | last post by:
I am building several (common) db-driven intranet sites (so I cant post URL), using a 3-frame layout; header, menu & main pages. The styling and some of the positioning is done via CSS. Up until yesterday, I had incomplete Doctypes in my pages: <!doctype html public "-//w3c//dtd html 4.01 transitional//en"> But now I have the full/correct doctype for 4.01 transitional:
6
5168
by: Patrick | last post by:
Hi I am fairly new to CSS and the web.I am trying to build a site more to practice my skills than for the site itself. I have been focusing on CSS and try my best to make it work in I.E 6.0, Opera 7.23, Mozilla 1.4 and N.N. 7.1. My site was doing fine until i read i was supposed to keep everything validated so i entered a strict html 4.01 doctype with url following.My HTML validated fine. So i validated my CSS and beside a little...
3
3791
by: Alex | last post by:
I created a page ( http://www.ayida.net/benaglia/chi.html ) based on the example B of the fixed-width layout i found here: http://builder.com.com/5100-6371-5314471-2.html the layout needs this doctype to work properly both on IE and Firefox: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> otherwise on IE it won't center the layout on the page. unfortunatly the above mentioned...
5
4114
by: Hello | last post by:
Here problem is that in Mozilla the logo "The Website" will not pad from the edge. http://www.clickatus.com/test/ Also, when I put in loose DOCTYPE it blows the whole thing... Help... http://www.clickatus.com/test/1
34
4440
by: The Good Son | last post by:
I'm trying to get my head around a problem that has me baffled. The following element: #wrapper {border:1px solid #000;background:#fff;} Renders as expected when using this DTD: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
2
3029
by: Martin Nadoll | last post by:
Hello, i am using Dreamweaver MX 2004 to develop my php and html-sites. Dreamweaver includes a doctype-definition when creating a new page, in my case: <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> Now i needed to make a table with 100% height to show the content vertical centered on my screen.
19
6476
by: Edward | last post by:
Why is it when I have a DOCTYPE line in my HTML then "margin" and "padding" are ignored? This happens in both inline and stylesheet styles. It happens for both XHTML and HTML doctypes. It happens in IE6, IE7 and Firefox (didn't try any others). And when you save the page, the margin/paddings are actually REMOVED from the saved HTML file (!). Why is this?
0
3212
by: =?Utf-8?B?SGFyZHkgV2FuZw==?= | last post by:
Hi all, I have a web form, and I want to use ModalPopupExtender from Ajax Toolkit. I am using IE 7.0 as browser, VS 2005 and Ajax and Ajax Tool Kit installed. Windows XP Pro. Now I have a very strange problem. With 2nd line of code (DOCTYPE), I can popup modal dialog in middle of screen, BUT all my styles are lost, including modal popup is ugly. If I remove DOCTYPE I can see all my styles, BUT modal
1
1409
by: MattB | last post by:
I haven't given much thought to DOCTYPE before. I have a vague idea of what it is and why it's there: to tell the browser what rules to follow when rendering the page. I have a ASP.net 1.1 application that has a little added JavaScript in it, but is by no means what I'd consider JavaScript intensive. It makes use of a stylesheet in fairly conservative ways and in general uses the html generated by VS.NET 2003. Now one of our clients...
14
3050
by: tader | last post by:
so i got script like that <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <html> <head> <title>Drag and Drop</title> <style> #slater { display:block;
0
9619
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10260
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...
0
10102
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9910
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8933
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...
0
5354
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...
0
5482
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4007
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
3
2850
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.