This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Stylesheets > June 2004 > Can CSS handle Include Files?
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Can CSS handle Include Files?
|
|
| Mario T. Lanza 2004-06-26, 7:15 pm |
| If you're a web designer, you have undoubtedly used cascading style
sheets in order to improve your sites separation of form and content.
You probably also use Server-side include files to include snippets of
content-building code.
I was thinking, how about adding a reference to an ASP or PHP include
file directly in the style sheet. The new INCLUDE attribute I'm
suggesting would be similar to the BEHAVIOR attribute except that it
would allow reference to a server-side script.
CSS:
..datebox {behaviour:url('getdatepopup.htc')} /* possible */
#sidebar {include:url('myfavoriteblogs.asp')} /* impossible? */
OLD MARKUP:
<div id=sidebar>
<!-- #include file="myfavoriteblogs.asp" -->
</div>
NEW MARKUP:
<div id=sidebar />
Even better if you could include multiple CSS references in display
order:
#sidebar {include:url('latestposts.asp');include:url('myfavoriteblogs.asp')}
Can you imagine how clean your markup would be if this were possible?
Is it possible? Any good techniques?
| |
|
|
| Wolfgang Wildeblood 2004-06-27, 4:14 am |
| mlanza@lycos.com (Mario T. Lanza) wrote:
> If you're a web designer, you have undoubtedly used cascading style
> sheets in order to improve your sites separation of form and content.
This would be what politicians call a "motherhood statement"? Why do
some new posters feel the need to do this? Is this one of those
unfriendly newsgroups that doesn't tolerate dissent? Getting to the
point...
> You probably also use Server-side include files to include snippets of
> content-building code.
You didn't mean to imply that the typical website includes only
"snippets of content" buried in a wasteful bloatemplate, I know.
> I was thinking, how about adding a reference to an ASP or PHP include
> file directly in the style sheet. The new INCLUDE attribute I'm
> suggesting would be similar to the BEHAVIOR attribute except that it
> would allow reference to a server-side script.
Since few people understand the wackiness of "behavio(u)r", that's
probably not the best analogy, but yeah.
> CSS:
>
> .datebox {behaviour:url('getdatepopup.htc')} /* possible */
Only in Microsoftland, but yeah.
> #sidebar {include:url('myfavoriteblogs.asp')} /* impossible? */
>
> OLD MARKUP:
>
> <div id=sidebar>
> <!-- #include file="myfavoriteblogs.asp" -->
> </div>
>
> NEW MARKUP:
>
> <div id=sidebar />
>
> Can you imagine how clean your markup would be if this were possible?
Yes. Please update your browser.
> Is it possible? Any good techniques?
The property to include content is called "content", not "include".
Doesn't work in Microsoftland, though.
Download Opera: http://www.opera.com
Read about CSS: http://www.w3.org
--
"I'm sorry, Miss Grant, but you're
going to be sacrificed to a noble end."
| |
| Spartanicus 2004-06-27, 4:14 am |
| mlanza@lycos.com (Mario T. Lanza) wrote:
>If you're a web designer, you have undoubtedly used cascading style
>sheets in order to improve your sites separation of form and content.
Kindly drop the condescending intros.
>I was thinking, how about adding a reference to an ASP or PHP include
>file directly in the style sheet. The new INCLUDE attribute I'm
>suggesting would be similar to the BEHAVIOR attribute
No such thing as "behaviour" in css 2.x, and css has properties and
values, not "attributes".
>CSS:
>
>.datebox {behaviour:url('getdatepopup.htc')} /* possible */
>
>#sidebar {include:url('myfavoriteblogs.asp')} /* impossible? */
CSS is for decoration, not for content. HTML is the correct place to
introduce a "client side include" mechanism. But since this would break
backward compatibility with existing agents, this should only be
attempted in a language that itself is designed to be not backward
compatible.
--
Spartanicus
| |
| Mario T. Lanza 2004-06-28, 4:14 am |
| Thanks for the info.
| |
| Roedy Green 2004-06-29, 11:14 pm |
| On Sun, 27 Jun 2004 08:07:00 +0100, Spartanicus <me@privacy.net> wrote
or quoted :
>
>Kindly drop the condescending intros.
I think he is trying to throw out jellybeans. He is smiling to let
you know he is not one of those newcomers hostile to CSS who come to
troll.
--
Canadian Mind Products, Roedy Green.
Coaching, problem solving, economical contract programming.
See http://mindprod.com/jgloss/jgloss.html for The Java Glossary.
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|