Welcome to HostingForumz.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in

Head style

 
   Web Hosting Problem Solving Community! (Home) -> Webmaster RSS
Next:  Web hosting companies  
Author Message
ngx

External


Since: Jun 28, 2003
Posts: 578



(Msg. 1) Posted: Mon Aug 04, 2003 2:29 pm
Post subject: Head style
Archived from groups: alt>www>webmaster, others (more info?)

Greetings one and all

Another question from the class of: "I'm sure it's in the spec somewhere,
if only I could find/decypher it."

Whether linked or not, styles go in the <head> this much we know.

Why?

style blocks appear to have the desired effect when located in the <body>

Is it compulsory or desirable to place them in the <head>? If the latter,
what are there advantages?

happy to discuss why it is an issue if you think it's relevant.

Thanks
--
William Tasso - http://WilliamTasso.com

 >> Stay informed about: Head style 
Back to top
Login to vote
user168

External


Since: Aug 04, 2003
Posts: 4



(Msg. 2) Posted: Mon Aug 04, 2003 2:36 pm
Post subject: Re: Head style [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"William Tasso" <ngx DeleteThis @tbdata.com> writes:
 > style blocks appear to have the desired effect when located in the <body>
 >
 > Is it compulsory or desirable to place them in the <head>? If the latter,
 > what are there advantages?

<a style='text-decoration: underline;' href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK" target="_blank">http://www.w3.org/TR/html401/struct/links.html#edef-LINK</a>
suggests that it is compulsory. Looking through the DTD confirms this
(<link> is in head.misc, which is allowed in <head> but not <body>)

Why is it an issue?

--
Chris<!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: Head style 
Back to top
Login to vote
steve1

External


Since: Aug 04, 2003
Posts: 8



(Msg. 3) Posted: Mon Aug 04, 2003 2:41 pm
Post subject: Re: Head style [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"William Tasso" <ngx RemoveThis @tbdata.com> wrote:

 >Another question from the class of: "I'm sure it's in the spec somewhere,
 >if only I could find/decypher it."
 >
 >Whether linked or not, styles go in the <head> this much we know.
 >
 >Why?

Because a <style> element is information about the document as a
whole, same as the <title> element or a <meta> element. This sort of
element goes in the head because that's what the head exists for. The
body on the other hand exists to contain the actual contents of the
page.

 >style blocks appear to have the desired effect when located in the <body>

Browsers support lots of bad coding to compensate for incompetent
authors. We all know that.

 >Is it compulsory or desirable to place them in the <head>? If the latter,
 >what are there advantages?

The most desirable place to put them is in an external stylesheet.
Imagine a long document with the <style> element at the end. The
document is entirely downloaded before the presentation can be applied
(okay so some browsers manage to do that anyway, the FOUC, with the
styles linked from the head). And what of there are multiple style
elements in the body. Should they apply to the whole document? just to
the container they are in? or from that piunt onwards?

  Steve

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

Steve Pugh <steve RemoveThis @pugh.net> <http://steve.pugh.net/><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Head style 
Back to top
Login to vote
ngx

External


Since: Jun 28, 2003
Posts: 578



(Msg. 4) Posted: Mon Aug 04, 2003 2:56 pm
Post subject: Re: Head style [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Chris Morris wrote:
 > "William Tasso" <ngx RemoveThis @tbdata.com> writes:
  >> style blocks appear to have the desired effect when located in the
  >> <body>
  >>
  >> Is it compulsory or desirable to place them in the <head>? If the
  >> latter, what are there advantages?
 >
<font color=purple> > <a style='text-decoration: underline;' href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK</font" target="_blank">http://www.w3.org/TR/html401/struct/links.html#edef-LINK</font</a>>
 > suggests that it is compulsory. Looking through the DTD confirms this
 > (<link> is in head.misc, which is allowed in <head> but not <body>)

ok - I'm happy to deliver it as a <style></style> block

 > Why is it an issue?

I'm building a component library and would like to deliver default styles
for the markup. The components are accessed with server side includes and I
have no control over their placement in the customer's page(s) - if there
are recommendations then I'll deliver them in the help text - I don't want
to lie or b/s but I'm trying to ensure trivial ease-of-use with minimum
support issues.

The styles are applied using specified classes and IDs and (should) only
apply to the items delivered by the component.

Many thanks
--
William Tasso - <a style='text-decoration: underline;' href="http://WilliamTasso.com" target="_blank">http://WilliamTasso.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Head style 
Back to top
Login to vote
eightninethree

External


Since: Jun 28, 2003
Posts: 171



(Msg. 5) Posted: Mon Aug 04, 2003 2:56 pm
Post subject: Re: Head style [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"William Tasso" <ngx DeleteThis @tbdata.com> wrote in message
news:bgldlb$q6n2i$1@ID-139074.news.uni-berlin.de...
 > Chris Morris wrote:
  > > "William Tasso" <ngx DeleteThis @tbdata.com> writes:
   > >> style blocks appear to have the desired effect when located in the
   > >> <body>
   > >>
   > >> Is it compulsory or desirable to place them in the <head>? If the
   > >> latter, what are there advantages?
  > >
<font color=green>  > > <a style='text-decoration: underline;' href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK</font" target="_blank">http://www.w3.org/TR/html401/struct/links.html#edef-LINK</font</a>>
  > > suggests that it is compulsory. Looking through the DTD confirms this
  > > (<link> is in head.misc, which is allowed in <head> but not <body>)
 >
 > ok - I'm happy to deliver it as a <style></style> block
 >
  > > Why is it an issue?
 >
 > I'm building a component library and would like to deliver default styles
 > for the markup. The components are accessed with server side includes and
I
 > have no control over their placement in the customer's page(s) - if there
 > are recommendations then I'll deliver them in the help text - I don't want
 > to lie or b/s but I'm trying to ensure trivial ease-of-use with minimum
 > support issues.
 >
 > The styles are applied using specified classes and IDs and (should) only
 > apply to the items delivered by the component.
 >

I know nothing about ASP, but with PHP, I typically call the style sheet as
a variable in the template. Right now, my defining of that variable is
pretty primative, but there's nothing that says it can't be completely
dynamic in some way (perhaps defining the customer's variables in a db or a
flat file).

Can ASP do this sort of thing?



--
Karl Core

Charles Sweeney says my sig is fine as it is.<!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Head style 
Back to top
Login to vote
ngx

External


Since: Jun 28, 2003
Posts: 578



(Msg. 6) Posted: Mon Aug 04, 2003 3:11 pm
Post subject: Re: Head style [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

Steve Pugh wrote:
 > "William Tasso" <ngx.DeleteThis@tbdata.com> wrote:
 >
 > [style]
 >
  >> Is it compulsory or desirable to place them in the <head>? If the
  >> latter, what are there advantages?

See other post in this thread to see why it's a potential issue.

 > The most desirable place to put them is in an external stylesheet.

ok, I can do that with the default style as long as the the author incudes
the component in the <head> then that is where I can deliver the link or
perhaps include the component right at the top of the document and make a
call in the <head> to deliver the style - either is possible, I'm trying for
maximum ease-of-use.

 > Imagine a long document with the <style> element at the end. The
 > document is entirely downloaded before the presentation can be applied
 > (okay so some browsers manage to do that anyway, the FOUC, with the
 > styles linked from the head). And what of there are multiple style
 > elements in the body. Should they apply to the whole document? just to
 > the container they are in? or from that piunt onwards?

Thanks - there shouldn't (huh) be multiple styles affecting the same markup
in this case but, of course, it's impossible to know for sure.

--
William Tasso - <a style='text-decoration: underline;' href="http://WilliamTasso.com" target="_blank">http://WilliamTasso.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Head style 
Back to top
Login to vote
ngx

External


Since: Jun 28, 2003
Posts: 578



(Msg. 7) Posted: Mon Aug 04, 2003 3:53 pm
Post subject: Re: Head style [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

EightNineThree wrote:
 > "William Tasso" <ngx.RemoveThis@tbdata.com> wrote in message
 > news:bgldlb$q6n2i$1@ID-139074.news.uni-berlin.de...
  >> Chris Morris wrote:
   >>> "William Tasso" <ngx.RemoveThis@tbdata.com> writes:
   >>>> style blocks appear to have the desired effect when located in the
   >>>> <body>
   >>>>
   >>>> Is it compulsory or desirable to place them in the <head>? If the
   >>>> latter, what are there advantages?
   >>>
<font color=brown>   >>> <a style='text-decoration: underline;' href="http://www.w3.org/TR/html401/struct/links.html#edef-LINK</font" target="_blank">http://www.w3.org/TR/html401/struct/links.html#edef-LINK</font</a>>
   >>> suggests that it is compulsory. Looking through the DTD confirms
   >>> this (<link> is in head.misc, which is allowed in <head> but not
   >>> <body>)
  >>
  >> ok - I'm happy to deliver it as a <style></style> block
  >>
   >>> Why is it an issue?
  >>
  >> I'm building a component library and would like to deliver default
  >> styles for the markup. The components are accessed with server side
  >> includes and I have no control over their placement in the
  >> customer's page(s) - if there are recommendations then I'll deliver
  >> them in the help text - I don't want to lie or b/s but I'm trying to
  >> ensure trivial ease-of-use with minimum support issues.
  >>
  >> The styles are applied using specified classes and IDs and (should)
  >> only apply to the items delivered by the component.
  >>
 >
 > I know nothing about ASP, but with PHP, I typically call the style
 > sheet as a variable in the template. Right now, my defining of that
 > variable is pretty primative, but there's nothing that says it can't
 > be completely dynamic in some way (perhaps defining the customer's
 > variables in a db or a flat file).
 >
 > Can ASP do this sort of thing?

Yes - trivially ;o)

That's one of the methods I employ in my templates.

I'm not delivering a template in this instance, just a component to sit
inside the authors page. Components - in this case - are made up of HTML
(and data/content as appropriate) with classes and IDs so I can style them.
Could be controlled/delivered from an external source but at the moment I'm
just delivering a scripted interface - of course a skilled user may choose
to drive that interface from a db or somesuch. I'm aiming to get to the
position that the component works with minimal/no configuration but allows
as much customisation as necessary for those that want/need to play.

--
William Tasso - <a style='text-decoration: underline;' href="http://WilliamTasso.com" target="_blank">http://WilliamTasso.com</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: Head style 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
HEAD request HTTP - Is there any legitimate use of the HEAD request in HTTP ? From my logs it seems that the only time this is being used is when the site is being probed, or dictionary attacked (I run a site with a members section) I have read up on the HTTP protocol and...

HEAD entries in Apache logs - Just recently I've been getting quite a lot, every day, of log entries like these: 195.93.34.10 - - [27/Jul/2004:17:15:45 +0100] "HEAD /hertfordshire/stalbans17big.html HTTP/1.1" 200 - "-" "-" They often occur in batches. ...

style of 2007 - for the designers: What do you think is the most 2007-style website you know?

Different Style Sheets for NN4.x and IE - Okay, I don't support NN4.x any more, but a client insists on usability on both browsers. My style sheet validates with W3C, but (surprise, surprise) fails to work well with NN4.x. I know someone here knows a code trick that will allow a different style...

looking at other sites style.css - Hi, I've pretty much just discovered how Cascading Style Sheets can help me. When I first learnt html, I enjoyed finding sites I liked the look of, and viewing the source. Is there a way of doing this with style sheets ? A site (say www.anysite.com )....
   Web Hosting Problem Solving Community! (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]