Gossamer Forum
Home : General : Perl Programming :

SPAN / DIV / LAYER / ILAYER ?

Quote Reply
SPAN / DIV / LAYER / ILAYER ?
Hello

I'm creating a page, and I need a picture to overlap another pictrues so I've resorted to layers. The page is up at:

http://beta.rachelsorganic.co.uk/index.html

I've designed the layers using the DIV tag because from what I have gathered; this is the most common tag for browsers to understand.

I need this page to be viewable with as many browsers as possible (obviously).

Can anyone tell me what the advantages and disadvantages of using

SPAN
DIV
LAYER
ILAYER

To lay out my document? I've read somewhere that LAYER and ILAYER are only supported by Netscape? Is this true?

Is there an actual standard on these layers? What is the most common one? And what is the one recommended by the W3C. I can't find the information required on their site (which is a firtst!).

Cheers

Wil

- wil

Last edited by:

Wil: Nov 1, 2001, 8:57 AM
Quote Reply
Re: [Wil] SPAN / DIV / LAYER / ILAYER ? In reply to
I always thought that if your page validated with W3C then it was cross-browser compatible.
Quote Reply
Re: [RedRum] SPAN / DIV / LAYER / ILAYER ? In reply to
Yeah, true. It passes without a problem. Well at least all the layers pass without a problem. It does churn up HTML errors which I'm not worried about.

- wil
Quote Reply
Re: [Wil] SPAN / DIV / LAYER / ILAYER ? In reply to
Right then. For anyone who is interested. This is the information I dug up on the topic:

The main difference between <SPAN> and <DIV> is that <DIV> is intended for larger sections of the page, containing several paragraphs, and its attributes are about alignment and text flow. <SPAN> is intended for small bits of text and its attributes are about the properties of that text.

LAYER and ILAYER should be missed altogether, because these are tags speficilary for NS4 and above. IE have never, and will never adopt these tags. They are not in HTML 4.

Cheers

Wil

- wil
Quote Reply
Re: [Wil] SPAN / DIV / LAYER / ILAYER ? In reply to
Greetings:

Will has pretty much summed it up for you.

Don't forget if you use the <DIV> tag in the way I am thinking you are (ie. using position elements), then you need to ensure that you have the Netscape Resize Fix (Javascript) loaded on your page - otherwise all Netscape browsers 4.x, if they resize the browser, will either see nothing or a jumbled mess.

Regards,


Clint.
--------------------------
http://AffiliatesDirectory.com
The Affiliate Programs Directory
Quote Reply
Re: [Clint] SPAN / DIV / LAYER / ILAYER ? In reply to
Yeah, Dreamweaver alerted me to that. I haven't actually added it in yet, but I will do so when launched.

Thanks for the tip.

- wil