Google Mail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Transform a Span into a Div
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  8 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Follow-up To:
Add Cc | Add Follow-up to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers that you hear
 
shapper  
View profile   Translate to Translated (View Original)
 More options 28 Dec 2006, 01:52
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: "shapper" <mdmo...@gmail.com>
Date: 27 Dec 2006 17:52:52 -0800
Local: Thurs 28 Dec 2006 01:52
Subject: Transform a Span into a Div
Hello,

I have Span tag. I want to change its behavior to a Div.

Is it possible to do this by simply applying the following CSS class to
the span tag:

.MySpan {display:block}

Thanks,
Miguel


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
dorayme  
View profile   Translate to Translated (View Original)
 More options 28 Dec 2006, 02:11
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: dorayme <doraymeRidT...@optusnet.com.au>
Date: Thu, 28 Dec 2006 13:11:57 +1100
Local: Thurs 28 Dec 2006 02:11
Subject: Re: Transform a Span into a Div
In article
<1167270772.534976.260...@73g2000cwn.googlegroups.com>,

 "shapper" <mdmo...@gmail.com> wrote:
> Hello,

> I have Span tag. I want to change its behavior to a Div.

> Is it possible to do this by simply applying the following CSS class to
> the span tag:

> .MySpan {display:block}

I want to be first to get this in: why would you want to do this?

--
dorayme


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shapper  
View profile   Translate to Translated (View Original)
 More options 28 Dec 2006, 02:48
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: "shapper" <mdmo...@gmail.com>
Date: 27 Dec 2006 18:48:04 -0800
Local: Thurs 28 Dec 2006 02:48
Subject: Re: Transform a Span into a Div
Because I am using ASP.NET and it wraps user controls inside span tags.
I would like the wrapper to behave as a div.

Thanks,
Miguel


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy Dingley  
View profile   Translate to Translated (View Original)
 More options 28 Dec 2006, 03:03
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: "Andy Dingley" <ding...@codesmiths.com>
Date: 27 Dec 2006 19:03:57 -0800
Local: Thurs 28 Dec 2006 03:03
Subject: Re: Transform a Span into a Div

shapper wrote:
> I have Span tag. I want to change its behavior to a Div.

It has two behaviours. One is from the HTML DTD (the nesting rules for
elements) You can't change this.

The other is for how it's displayed. This is controllable by CSS, just
as you describe.

You can make a <span> display like a block, but you still can't put a
<p> inside it.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
shapper  
View profile   Translate to Translated (View Original)
 More options 28 Dec 2006, 12:57
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: "shapper" <mdmo...@gmail.com>
Date: 28 Dec 2006 04:57:05 -0800
Local: Thurs 28 Dec 2006 12:57
Subject: Re: Transform a Span into a Div

Andy Dingley wrote:
> shapper wrote:

> > I have Span tag. I want to change its behavior to a Div.

> It has two behaviours. One is from the HTML DTD (the nesting rules for
> elements) You can't change this.

Where can I find some information on nesting rules?

Can I include a <div> inside a <span>?

Thanks,
Miguel


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy Dingley  
View profile   Translate to Translated (View Original)
 More options 28 Dec 2006, 14:31
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: "Andy Dingley" <ding...@codesmiths.com>
Date: 28 Dec 2006 06:31:58 -0800
Local: Thurs 28 Dec 2006 14:31
Subject: Re: Transform a Span into a Div

shapper wrote:
> Where can I find some information on nesting rules?

http://www.w3.org/TR/html4/sgml/dtd.html

Not the easiest thing to learn to read though!  (search for "DTD
introduction" or something)

> Can I include a <div> inside a <span>?

No.  Here's a small snippet of the DTD

<!--
    HTML has two basic content models:

        %inline;     character level elements and text strings
        %block;      block-like elements e.g. paragraphs and lists
-->
Actually there's a third one too %flow;, which comprises both %inline;
and %block; elements

<!-- %inline; covers inline or "text-level" elements -->
<!ENTITY % special
   "A | IMG | OBJECT | BR | SCRIPT | MAP | Q | SUB | SUP | SPAN | BDO">

<!ENTITY % inline "#PCDATA | %fontstyle; | %phrase; | %special; |
%formctrl;">

So we see from this that <span> is one member of %inline; and also of
%flow;  (see below)

<!ENTITY % block
     "P | %heading; | %list; | %preformatted; | DL | DIV | NOSCRIPT |
      BLOCKQUOTE | FORM | HR | TABLE | FIELDSET | ADDRESS">

<!ENTITY % flow "%block; | %inline;">

We see here that <div> is one member of %block; and thus of %flow; but
NOT %inline;

<!ELEMENT SPAN - - (%inline;)*  >

<!ELEMENT DIV - - (%flow;)*  >

<span> can contain anything from %inline;
<div> can contain anything from %block; or %inline;

So <div> can contain <span>, but <span> can't contain <div>

Now see if you can read the DTD yourself and see where <p> fits into
all this.


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Martin Clark  
View profile   Translate to Translated (View Original)
 More options 28 Dec 2006, 14:32
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: Martin Clark <mar...@spl.at>
Date: Thu, 28 Dec 2006 14:32:16 +0000
Local: Thurs 28 Dec 2006 14:32
Subject: Re: Transform a Span into a Div
shapper wrote...

>Where can I find some information on nesting rules?

>Can I include a <div> inside a <span>?

No.

A div is a block-line element whereas a span is an in-line element.
You can put an in-line element inside a block-line element, but not the
other way around.

See http://www.cs.tut.fi/~jkorpela/html/nesting.html for an indication
of hierarchy of elements.

See http://htmldog.com/guides/htmlintermediate/spandiv/ for more about
spans and divs.
--
Martin Clark


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Jukka K. Korpela  
View profile   Translate to Translated (View Original)
(2 users)  More options 30 Dec 2006, 18:32
Newsgroups: comp.infosystems.www.authoring.stylesheets
From: "Jukka K. Korpela" <jkorp...@cs.tut.fi>
Date: Sat, 30 Dec 2006 20:32:38 +0200
Local: Sat 30 Dec 2006 18:32
Subject: Re: Transform a Span into a Div
P.S. Hint: Learn how to quote on Usenet, or stay tuned to be ignored in
future.

That would be odd. Why don't you fix the way the markup is generated.

So do you really want your page work the intended way only when CSS is
enabled?

> Because I am using ASP.NET and it wraps user controls inside span
> tags. I would like the wrapper to behave as a div.

Scripsit shapper:

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message, you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google