473,772 Members | 2,414 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 3783
TC

JP. Baker wrote:
In article <11************ **********@p79g 2000cwp.googleg roups.com>,
TC <gg************ *@spamgourmet.c omwrote:
C:\styles.css:

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

right center;
Right ** ON ** !

Thanks - that was the problem. It now works fine in IE6 and FF1.5. I
double-checked, but couldn't see it for looking!

I've answered nearly 10,000 usenet questions myself, mainly regarding
MS Access, over the past 12+ years or so. It's really good to get an
answer to one of my own problems! What an amazing resource, is usenet.

Thanks to you & Els,

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

Jul 24 '06 #11
TC

Els wrote:
Can you put the example online?
Resolved per other post. Thanks for your help :-) Yea usenet!

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

Jul 24 '06 #12
Els
TC wrote:
JP. Baker wrote:
>In article <11************ **********@p79g 2000cwp.googleg roups.com>,
TC <gg************ *@spamgourmet.c omwrote:
>>>C:\styles.cs s:

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

right center;

Right ** ON ** !
That's what I said - very first line in first reply. I'm surprised it
got past the validator. Or maybe you only validated the HTML... ?

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Jul 24 '06 #13
TC

Els wrote:
TC wrote:
.extlink {
background: url(http://tc2.atspace.com/extlink.gif) no-repeat
right middle;

Make that right center.
Els, I just realized, that I ignored your suggestion (above) because I
thought (when I read it) that you were just suggesting a cosmetic
change. (Ie. "it would look better centered, instead of where you
currently have it".)

I didn't see that you had noticed that my syntax was wrong. The other
responded said the same thing. But you saw it first! Thanks again,

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

Jul 24 '06 #14
TC

Els wrote:

That's what I said - very first line in first reply. I'm surprised it
got past the validator. Or maybe you only validated the HTML... ?
Yes. I just realized that, & replied above accordingly :-)

Maybe the w3c html validator does not validate the referenced css? I'll
try validating the original error with a css validator & post back
here.

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

Jul 24 '06 #15
TC

TC wrote:
Els wrote:

That's what I said - very first line in first reply. I'm surprised it
got past the validator. Or maybe you only validated the HTML... ?

Yes. I just realized that, & replied above accordingly :-)

Maybe the w3c html validator does not validate the referenced css? I'll
try validating the original error with a css validator & post back here.
Geez I'm being enormously slow on the uptake here! :-((

You said, maybe I only validated the HTML !!

Exactamundo.

I just validated the orgnal (bad) CSS at
http://jigsaw.w3.org/css-validator . It said:

"Invalid number : background Too many values or values are not
recognized : url(http://i.microsoft.com/h/en-us/i/msnlogo.gif)
no-repeat right middle"

Q.E.D. :-)

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

Jul 24 '06 #16
Els
TC wrote:
I just validated the orgnal (bad) CSS at
http://jigsaw.w3.org/css-validator . It said:

"Invalid number : background Too many values or values are not
recognized : url(http://i.microsoft.com/h/en-us/i/msnlogo.gif)
no-repeat right middle"

Q.E.D. :-)
:-) np

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Jul 24 '06 #17
TC wrote:
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.
When I load a on my hard drive into IE as a file without using http, the
security level indicator shows "My Computer", not 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.
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.

I think you may be misinterpreting the situation. The current security
level is based on the page currently in your browser. If the page in
your browser is external, a higher security level applies. A *link* is
subject to fewer restrictions (if any at all) than a *link* to a local
file, the whole point being that if an external page is trying to get
you to click a link to your own files, it might be because it's trying
to cause trouble.
Jul 24 '06 #18
Els wrote:
>
What *is* a mark of the web?
http://msdn.microsoft.com/workshop/a...rview/motw.asp

--
Ed Mullen
http://edmullen.net
http://mozilla.edmullen.net
http://abington.edmullen.net
Deja Goo: The feeling that you've stepped in this before.
Jul 24 '06 #19
"Ed Mullen" <ed@edmullen.ne twrote in message
news:94******** *************** *******@giganew s.com...
Els wrote:

What *is* a mark of the web?

http://msdn.microsoft.com/workshop/a...rview/motw.asp
Interesting. I've seen those type of lines, primarily when emailing files
from an IE environment at work to my Firefox-based environment at home. I've
just deleted them.

Never heard of the term "mark of the web" before though.

--
Richard
Jul 24 '06 #20

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
4441
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
9454
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
10103
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...
1
10038
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
8934
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
7460
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
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
2
3609
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.