Web Design Web Design Forum
Registration is free! Here you can view your subscribed threads, work with private messages and edit your profile and preferences Calendar Find other members Frequently Asked Questions Search
Home Web Design

Convenient web based access to our favorite web design Usenet groups

web design reviews

This is Interesting: Free Magazines for Graphics designers and webmasters  





  Last Thread  Next Thread
Author
Thread Post New Thread   

Can CSS handle Include Files?
 

Mario T. Lanza




quote this post edit post

IP Loged report this post

Old Post  06-27-04 - 12:15 AM  
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.a
sp')}

Can you imagine how clean your markup would be if this were possible?
Is it possible?  Any good techniques?


Post Follow-Up to this message ]
Re: Can CSS handle Include Files?
 

Stan Brown




quote this post edit post

IP Loged report this post

Old Post  06-27-04 - 04:14 AM  
"Mario T. Lanza" <mlanza@lycos.com> wrote in
comp.infosystems.www.authoring.stylesheets:
>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.

Why would that need to be new? You include a URL; the Browser
fetches the URL. If that URL happens to be a script, that's the
server's business and the browser doesn't care.

What am I missing?

--
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/


Post Follow-Up to this message ]
Re: Can CSS handle Include Files?
 

Wolfgang Wildeblood




quote this post edit post

IP Loged report this post

Old Post  06-27-04 - 09: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."


Post Follow-Up to this message ]
Re: Can CSS handle Include Files?
 

Spartanicus




quote this post edit post

IP Loged report this post

Old Post  06-27-04 - 09: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


Post Follow-Up to this message ]
Re: Can CSS handle Include Files?
 

Mario T. Lanza




quote this post edit post

IP Loged report this post

Old Post  06-28-04 - 09:14 AM  
Thanks for the info.


Post Follow-Up to this message ]
Re: Can CSS handle Include Files?
 

Roedy Green




quote this post edit post

IP Loged report this post

Old Post  06-30-04 - 04:14 AM  
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.


Post Follow-Up to this message ]
Sponsored Links
 





All times are GMT. The time now is 04:32 AM. Post New Thread   
  Previous Last Thread   Next Thread next
Stylesheets archive | Show Printable Version | Email this Page | Subscribe to this Thread

Popular forums

Adobe Photoshop forum Macromedia Flash Web Site Design
Dreamweaver FrontPage forum
JavaScript Forum XML forum
Style Sheets VRML
Forum Jump:
Rate This Thread:

 

XML RSS Feed web design latest articles Syndicate our forum via XML or simple JavaScript

Web Design archive  Database administration help  


Top Home  -  Register  -  Control Panel   -  Memberlist  -  Calendar  -  Faq  -  Search Top