• Quick note - the problem with Youtube videos not embedding on the forum appears to have been fixed, thanks to ZiprHead. If you do still see problems let me know.

Am I missing something? (html/mozilla question)

Rat

Not bored. Never bored.,
Joined
May 19, 2003
Messages
10,629
Location
Leicester, UK
So I'm trying to set up a web page. It's been a long time since I've done it from scratch, and after 10 pints, it's making little sense to me.

I look at the rudimentary framework, at http://81.6.232.254/testing/ and the left frame doesn't appear at all in IE. In Mozilla, the images all appear with the link border around them, though I've tried not to make them appear.

Save my sanity. What basic thing am I missing?

Cheers,
Rat.
 
I don't have my handy-dandy html textbook with me, but I think you can try having border=0 in either the link or the image tag.
 
No indeed, all my handy html textbooks are at work. I'm trying to put all the style into stylesheets, because I'm a terrible html snob. Is this not possible in Mozilla?

Cheers,
Rat.
 
ratcomp1974: What basic thing am I missing?
You have your STYLE tag nested inside a SCRIPT tag. Un-nest them and it should work.

Also (and I cannot emphasize this too strongly), when you use an IMG tag, also specify the WIDTH and HEIGHT attributes. And if you want your page to pass validation, also specify the ALT attribute, even if it's just an empty string.

One more thing. In my professional opinion, I strongly recommend against using frames, especially the way you are using them. Use CSS instead. It goes against my better judgment to continue offering any professional assistance at all to anyone who persists in abusing frames the way you are abusing them. :)
 
My god. I feel such a fool. The incorrect nesting and the stop rather than slash are both due to my drunkenness.

I cannot agree more about frames. I will never use tables for layout, and when I get things sorted, I will not use frames either.

This is, of course, a preliminary thing, for my own use, and that of knowledgable jref members, only. All alt tags will be used, all images will be properly dimensioned, and so on, when I'm done.

I just hit this first hurdle and was too drunk to see it. Apologies to all concerned.

Cheers,
Rat.
 
ratcomp1974 said:
No indeed, all my handy html textbooks are at work.

The only HTML textbook you need:

http://www.w3.org/TR/html4/

I'm trying to put all the style into stylesheets, because I'm a terrible html snob. Is this not possible in Mozilla?

It's absolutely possible. In fact, this is the preferred way to do it, and Moz handles it a lot better than IE.
 
ratcomp1974 said:
I cannot agree more about frames. I will never use tables for layout, and when I get things sorted, I will not use frames either.

Agreed with frames, but tables are just way too useful and reliable not to use for layout, IMO.

Oh, BTW, you might want to make sure your HTML validates:

http://validator.w3.org/

And your style sheets as well:

http://jigsaw.w3.org/css-validator/

If it validates, then I've found it should look the same in most any browser.
 
I do have a print out (courtesy of my workplace) of the w3c recommendations for html, css, svg, and various others.

I'm snobby enough to believe that if it can't be done in CSS (i.e. without tables) then it's my talent that's lacking, rather than specifications. This has caused me much pains in the past. It will cause me much more when I move this site to css from frames. And yes, I do have (albeit shaky) reasons for sketching it out in frames first.

I will submit (as I always do) my site to the w3c validation when finished.

Cheers,
Rat.
 
A few more things after quickly perusing your code:

You're using XHTML instead of HTML, so all elements must be closed. For example:

<pre><img src="g/2PhotosW.png" height="16px" width="224px"></pre>

Should be:

<pre><img src="g/2PhotosW.png" height="16px" width="224px" /></pre>

If you don't want to do that, make it regular HTML nstead of XHTML, which is probably the way to go anyway as you don't appear to be doing anything that requires XML.

Also, with the images, you don't specify "px" for the width and height; just the numbers. So it really should be:

<pre><img src="g/2PhotosW.png" height="16" width="224" /></pre>

And as Xouper said, you really do need an alt attribute of some kind, even if it's empty:

<pre><img src="g/2PhotosW.png" height="16" width="224" alt="Photos" /></pre>

Your mouseover on Line 24 isn't working because it should go with the <a> element and not the <img> element. Also, inside your onMouseOver value use single quotes instead of double; the doubles are terminating the string. You also need a semicolon at the end of every JavaScript command. This is how it should be:

<pre>onMouseOver="mouseOn('pic2','1HomeC.png');"</pre>
 
Yup, I intend to use xhtml, and I will tidy up those bits that don't fit when I'm finished. I really do know about closing elements, and specifying units. Honest.

Man, did I step into a can of worms here....

Cheers,
Rat.
 
ratcomp1974 said:
Yup, I intend to use xhtml, and I will tidy up those bits that don't fit when I'm finished. I really do know about closing elements, and specifying units. Honest.

Man, did I step into a can of worms here....

Hey, you asked. Just trying to help ya out, man.
 
And I do appreciate the help, really. Thank you. All.

All working now, and UK viewers of a certain age will recognize the navigation system.

Cheers,
Rat.
 
ratcomp1974: The images still don't appear for me in sodding IE, though.
That's because mozilla uses a different DOM (document object model) than Microsoft. What many javascript programmers do is encapsulate the differences and keep them out of the main code. Providing such cross-browser support is described on many online javascript tutorials.

Microsoft bashers blame Microsoft and Netscape bashers blame Netscape for the DOM incompatibility. Blame is irrelevant, however, so I advise just grin and bear it like the rest of the web developers around the world.


Edited to add this reference:
http://www.webreference.com/programming/professional/chap6/1/
 
xouper: That's because mozilla uses a different DOM (document object model) than Microsoft.
I may have spoke too soon without looking closely enough at your code. If one of the other gurus on this forum doesn't beat me to it, I'll take a closer look as soon as I can get to it.
 
Yes, I've tried taking out all of the link tags, so it's just a list of images. Nothing strange in the image tags. Still they don't appear in IE.

The images are pngs, of course, but they've been supported since IE4 at least, and they open in any other application.

The frame that holds them is wide enough, and they don't appear even if I open that frame separately.

I can only imagine that I've forgotten to close a tag somewhere or something equally brainless.

Cheers,
Rat.
 
So it's not the images. It's not actually getting the page at all, as evidenced by its not printing the random plain text I inserted.

This is driving me up the wall now.

Cheers,
Rat.
 
ratcomp1974: This is driving me up the wall now.
When I download the specnav.html to my hard drive, the image rollevers work fine in IE, but not when I use IE to access the page on your server. Hmmm.

Also, I noticed that in the javascript, you have "new Image(224,26)" whereas the images are actually only 16 px high. This is not the source of the IE rollover problem, however.
 

Back
Top Bottom