Click here to get back home

White space, new lines in tags

 HomeNewsGroups | Search | About
 comp.infosystems.www.authoring.html    Post an article   get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content
Subject Author Date
White space, new lines in tags Harlan Messinger 03-25-2006
Get Chitika Premium
Posted by Alan J. Flavell on April 11, 2006, 6:04 am
Please log in for more thread options


On Tue, 11 Apr 2006, Jack wrote:

> jschleiden@gmail.com wrote:
> > How about something like this:
> >
> > <div id="content" class="example TemplateExample">whatever</div>
> >
> > How is that handled? Also what is the benefit?
>
> That declares a <div> element that belongs to two distinct classes.
> The benefit might be some elegance/efficiency in the associated CSS.

It might also hide the associated styling from some lesser
browser/versions which don't understand the multiple-class construct.
Whether one considers that a disadvantage or a benefit depends on
one's attitude to web design. (no smiley)

regards

Posted by Tony on April 11, 2006, 1:56 pm
Please log in for more thread options


Alan J. Flavell wrote:
> On Tue, 11 Apr 2006, Jack wrote:
>
>>jschleiden@gmail.com wrote:
>>
>>>How about something like this:
>>>
>>><div id="content" class="example TemplateExample">whatever</div>
>>>
>>>How is that handled? Also what is the benefit?
>>
>>That declares a <div> element that belongs to two distinct classes.
>>The benefit might be some elegance/efficiency in the associated CSS.
>
> It might also hide the associated styling from some lesser
> browser/versions which don't understand the multiple-class construct.

Browsers/versions such as...? I haven't encountered that particular
limitation yet, so I'd like to know where it pops up.

Posted by Alan J. Flavell on April 11, 2006, 3:00 pm
Please log in for more thread options


On Tue, 11 Apr 2006, Tony wrote:

> Alan J. Flavell wrote:
> >
> > It might also hide the associated styling from some lesser
> > browser/versions which don't understand the multiple-class
> > construct.
>
> Browsers/versions such as...? I haven't encountered that particular
> limitation yet, so I'd like to know where it pops up.

I don't have details at my fingertips, but google search for terms e.g

multiple.classes css bugs

suggests, among other things,

http://www.richinstyle.com/bugs/table.html

http://www.pixelsurge.com/experiment/multiplestyles.htm

- which don't necessarily agree with each other; but it seems the
affected browsers are old enough by now that their users may be
presumed to encounter quite enough problems with other people's web
pages that a few missing CSS styles on ours would be of no great
consequence to them. After all, CSS is meant to be optional, by
design.

As ever, YMMV ...

regards

Posted by Andy Dingley on April 12, 2006, 6:48 am
Please log in for more thread options


Alan J. Flavell wrote:

> It might also hide the associated styling from some lesser
> browser/versions which don't understand the multiple-class construct.

IMHE there aren't any browsers that suffer from this.

Counter-examples welcome. I'm sure there are some, but they're not
examples that are going to worry me or make me stop using the multiple
class technique.


Posted by VK on March 27, 2006, 4:27 am
Please log in for more thread options



Harlan Messinger wrote:
> What rules deal with attribute values with trailing spaces, or tags or
> attribute values with embedded newlines? Examples below: the HREF with
> embedded newline, the SRC with trailing spaces, and IMG tag spread over
> multiple lines.
>
>         <a href="myself.html
>                 ">
>         <img src="/images/picture.gif " width="80"
>                 height="65"
>                 alt="What, me worry?"></a>

Space characters (space, tab, form feed, new line) are not significant
and being collapsed to a single space by parser (unless in <pre>
block).

This is HTML rule equal for all UA's (including Amaya).

You may want to watch instead line breaks and spaces *between* tag
because on some surrent implementations it leads to phantom nodes in
DOM Tree.


Similar ThreadsPosted
adding white space in

August 31, 2005, 4:34 pm
White space, collapsing March 28, 2006, 10:47 am
Don't bother saving white-space August 19, 2004, 9:49 pm
White space problem (table) April 3, 2006, 8:31 am
some (undesired) white space in Firefox but not IE November 6, 2006, 2:27 pm
Table problem: 1px white space February 19, 2008, 7:13 am
 versus  white-space:pre; when pasting
July 20, 2005, 12:06 am
Style tags -- Eeek how obese these tags make HTML! November 8, 2006, 3:33 am
Meta Tags, Link Tags, other September 27, 2005, 3:29 pm
Table without lines June 12, 2008, 12:15 pm

Our other projects:

Art Dolls, Fairies and Mermaids - Sunnyfaces.net

Roy's Linux, Programming and Search Engines messages

1-Script XML SitemapXML Sitemap