473,574 Members | 2,533 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

two, possibly off-topic, questions

Question 1:

Everyone here seems settled that the <div> tag is the place for an id
attribute and <span> tags are for class attributes. Why? It seems to me
that they are interchangeable . (Something about the aesthetics of the
whole thing wants to do away with <div> tags altogether and simply use
<span>. Is there some trap in doing this that I haven't found yet?)
Question 2:

I like the idea of inline frames. Hell, I may as well admit it, I like
frames [I hate when a menu scrolls off the screen because the doc I'm
viewing has to be scrolled through] but I do understand that they create
problems and I'm not going to argue this now. My question is that I have
one particular project where an <iframe> is REALLY helpful. Alas, only
Opera and Konqueror treat my code with respect. Both Mozilla and IE
refuse to replace my docs inside the frame and, instead, open a new
window. Is that simply the current state of support for <iframe> or are
there things that can get these others to play nice?

(The specific files I want to use contain copyrighted material which I'm
reluctant to put on the WWW, but if my description of this problem is
inadequate, I'll put some dummy files up to show you what I mean.)

Maury

--
http://www.his.com/~merkin
Jul 20 '05 #1
6 1648
"Maury Merkin" <me****@his.com > wrote:
Everyone here seems settled that the <div> tag is the place for an id
attribute and <span> tags are for class attributes.
Have they? I see no evidence of that.
Why?
Maybe you're getting that impression beacause large divisions of a
page (marked up with <div>s) are more likely to be unique and hence
labelled with an id. Whilst short phrases (marked up with <span>s) are
more likely to occur more than once and thus should be labelled with
class.
<div id="navigation" > vs <span class="date">

But id and class can be applied to any element.
It seems to me hat they are interchangeable .
In HTML terms they are not. <div> is a block, <span> is inline; they
have different content models, etc.

Whilst they can be made to appear the same via CSS (i.e. display:
inline; for div or display: block; for span) that doesn't change they
structural nature.
(Something about the aesthetics of the
whole thing wants to do away with <div> tags altogether and simply use
<span>. Is there some trap in doing this that I haven't found yet?)
You can't nest paragraphs, tables, lists, headings, blockquotes, etc.
inside spans.
one particular project where an <iframe> is REALLY helpful. Alas, only
Opera and Konqueror treat my code with respect. Both Mozilla and IE
refuse to replace my docs inside the frame and, instead, open a new
window. Is that simply the current state of support for <iframe> or are
there things that can get these others to play nice?
How are you linking to the new document?
Is the link inside the iframe or in the parent page?
(The specific files I want to use contain copyrighted material which I'm
reluctant to put on the WWW, but if my description of this problem is
inadequate, I'll put some dummy files up to show you what I mean.)


Yes do so.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #2
Steve Pugh <st***@pugh.net > wrote:
"Maury Merkin" <me****@his.com > wrote:


re: <iframe> question
(The specific files I want to use contain copyrighted material which I'm
reluctant to put on the WWW, but if my description of this problem is
inadequate, I'll put some dummy files up to show you what I mean.)


Yes do so.


But do so in another newsgroup, it's not a stylesheet issue. I'd
suggest comp.infosystem s.www.authoring.html

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net > <http://steve.pugh.net/>
Jul 20 '05 #3
On Sun, 06 Jun 2004 11:35:39 -0400, Maury Merkin <me****@his.com > wrote:
Question 1:

Everyone here seems settled that the <div> tag is the place for an id
attribute and <span> tags are for class attributes.


Where is "here"? On this newsgroup, it's understood that id and class are
used more appropriately than that. If you mean a different "here", I
assure you "they" are wrong.
Jul 20 '05 #4
"Maury Merkin" <me****@his.com > wrote in
comp.infosystem s.www.authoring.stylesheets:
Everyone here seems settled that the <div> tag is the place for an id
attribute and <span> tags are for class attributes.


Huh? I don't know where "here" is, but I've never observed any such
consensus.

id attributes must be unique within page; a class can be used many
times on a page. That's kind of irrelevant to using div or span
tags.

--
Stan Brown, Oak Road Systems, Cortland County, New York, USA
http://OakRoadSystems.com/
HTML 4.01 spec: http://www.w3.org/TR/html401/
validator: http://validator.w3.org/
CSS 2 spec: http://www.w3.org/TR/REC-CSS2/
2.1 changes: http://www.w3.org/TR/CSS21/changes.html
validator: http://jigsaw.w3.org/css-validator/
Jul 20 '05 #5
"Maury Merkin" <me****@his.com > wrote:
Question 1:

Everyone here seems settled that the <div> tag is the place for an id
attribute and <span> tags are for class attributes.
The id attribute is a unique identifier, used to name a single element
on a page. (This isn't merely a custom or common practice, it's a rule
of HTML. Using the same id value twice on one page results in an
invalid page.) Applying a style to the element that has a particular
id is only one of the uses of the id attribute. Other uses include
setting destinations for internal document links and DOM manipulation
by script.

The class attribute is to indicate that any number of elements are
intended to share some set of characteristics , typically a set of
styles. For example, you might have classes for names of species
(recalling a discussion held here several months ago), links to
entries in your web site's glossary (as distinct from links to any
other page), footnotes, lines of poetry, and so on.

If you use DIVs to divide your page up into its principal components,
then, yes, each DIV will probably have a distinctive function that
would be best reflected in a unique ID: "banner", "leftnav", "topnav",
"footer", "sidebar", "mainconten t". These are things of which the page
has one each. So it makes sense that *these* DIVs would have id
attributes, which would be used to apply styles specific to one or
another of them. But if, say, you have a lot of photographs on your
page, each with information related to it in a particular format, then
you might want to wrap a DIV around each photo with its info, and
format all these DIVs the same way. That would call for a class rather
than an ID.

There isn't generally any reason why a non-block element on a page
would warrant having a style assigned to it based on a unique ID, even
if it has one. So for spans, styles will most likely be associated
with them based on classes (like "species", "glossaryli nk", "poetry",
"footnote", and so forth)..
Why? It seems to me
that they are interchangeable . (Something about the aesthetics of the
whole thing wants to do away with <div> tags altogether and simply use
<span>. Is there some trap in doing this that I haven't found yet?)


DIVs are blocks and SPANs are inline. Yes, you can change that with
CSS, but speaking in terms of document structure, a DIV is, a full
division of the page, if you think of a page being broken up into
blocks. A span is not necessarily an integral component of anything.
--
Harlan Messinger
Remove the first dot from my e-mail address.
Veuillez ôter le premier point de mon adresse de courriel.
Jul 20 '05 #6
Maury Merkin wrote:
Question 1:

<snip>Questio n about using <div> and <span> with ids and classes.</snip>
Question 2:

<snip>Questio n about <iframe></snip>
Then why on earth did you post them to c.i.w.a.stylesh eets? They're
clearly HTML questions, which should be directed at c.i.w.a.html, where
they would actually be two, possibly /on-topic/, questions.
(The specific files I want to use contain copyrighted material which
I'm reluctant to put on the WWW, but if my description of this problem
is inadequate, I'll put some dummy files up to show you what I mean.)


When you're experiencing a problem with some code, it is always
preferable to upload some files to a server somewhere and give a URI.
Or, at a minimum, provide a small snippet of sample code, so that
someone may see where you're error is; however this is *not* useful for
full HTML files, where we would need to copy the code and make a new
file to test it — it's too time consuming. Also, validating you're code
first always helps, and may infact solve you're problem without needing
to ask.

--
Lachlan Hunt
http://www.lachy.id.au/
la**********@la chy.id.au.updat e.virus.scanners

Remove .update.virus.s canners to email me,
NO SPAM and NO VIRUSES!!!
Jul 20 '05 #7

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

Similar topics

3
1174
by: PeteC | last post by:
I've got a dedicated server running Windows 2003, IIS, MySQL and PHP. I'm working on a web site which needs to pick data up on a semi-regular basis from a CSV file which will exist in a directory accessible to this server. The data will be put there by another server. I need to pick up this data and insert it into a MySQL table; I have...
0
1078
by: MsOsWin | last post by:
http://www.google.com/search?hl=en&lr=&ie=ISO-8859-1&safe=off&as_qdr=all&q=inurl%3Afeeds+site%3Agroups- beta.google.com
8
1657
by: Adrienne | last post by:
The elements MENU and DIR were in the HTML 2.0 spec, and disappeared in 4. I would like to have them back, they makes sense. For example: <menu> <li>Home</li> <li>Contact</li> </menu> Perhaps speech enabled user agents could react accordingly, perhaps say
1
1280
by: ChrisC | last post by:
I have my aspx page that contains an iframe. when I navigate the iframe to other places by changing the src attribute on a button click from the .net portion of the page I lose all viewstate information - drop downs revert to default and even more bizarrely, any further attempt to change them has the same result - it enters code in the...
2
2151
by: Poly-poly man | last post by:
I am working on a GTK Midi player (timidgtk.sourceforge.net). As you can see, it's just a timidity frontend. With version 0.03, I'm trying to devel it to use SDL_sound to play the midis. First off, is there a better library for this? Right now I'm writing a test program to play on console, just so that I can narrow problems down very...
4
1900
by: Jim Langston | last post by:
In my program I am accepting messages over the network and parsing them. I find that the function that does this has gotten quite big, and so want to break the if else code into functions. I started thinking of how to do this, but came up with a number of ways and don't know what would be best, and fit into the C++ idoism. This is what I...
8
2179
by: subramanian100in | last post by:
Suppose I have #include <stdio.h> #include <string.h> size_t strlen(const char *str) { printf("from strlen - %s\n", str); return 0; // return some dummy value
6
1703
by: Designing Solutions WD | last post by:
I have the following table. GO /****** Object: Table . Script Date: 05/01/2007 10:42:31 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO
7
1643
by: Erwin Moller | last post by:
Hi group, Does anybody know what causes the following Warning? __________________________________________________ Warning: Unknown(): Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless...
7
7342
by: ghjk | last post by:
I developed web application using php. But some pages display a error message. Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality...
0
7794
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...
0
8040
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. ...
0
8225
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...
0
8092
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...
0
6437
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...
1
5610
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...
0
3738
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...
1
2230
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
1
1332
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.