Click to See Complete Forum and Search --> : Can a list of styles be embedded in the BODY?
Bigjohn
03-23-2004, 01:53 PM
Can a list of styles :
<style type="text/css">
body {
margin: 20px;
background: #9A823A;
color: #4C401C;
text-align: center;
padding: 0;
}
#outer {
text-align:left;
border:1px solid #000000;
width:740px;
/* height:440px;
overflow:hidden; */
margin:auto;
}
</style>
be embeded at the top of the body of a document?
of can styles only be in the HEAD?
John
Vladdy
03-23-2004, 01:59 PM
Why would you want to put them in the document body anyway, not that you can: http://www.w3.org/TR/html4/present/styles.html#h-14.2.3
Bigjohn
03-23-2004, 03:36 PM
Originally posted by Vladdy
Why would you want to put them in the document body anyway, not that you can: http://www.w3.org/TR/html4/present/styles.html#h-14.2.3
I want to embed a list of styles into the 'body' section of the HTML - to style an item listing on EBAY.
They control the HEAD of the document, so I have no way to put anything there.
John
Vladdy
03-23-2004, 03:58 PM
hmm.... that is a good one [reason]
While it is not legal, it seems like both IE and Gecko recognize the style element found in the document body and apply declaration within it correctly. It also does not seem to matter where the style element is inserted within the body.
So, since the HTML blocks you are using on e-bay have a limited lifespan ;) and you are not concerned about validation, I would go ahead and put style element wherever you please.
Thanks for helping in acquiring this piece of information :)
Bigjohn
03-23-2004, 05:13 PM
Originally posted by Vladdy
hmm.... that is a good one [reason]
While it is not legal, it seems like both IE and Gecko recognize the style element found in the document body and apply declaration within it correctly. It also does not seem to matter where the style element is inserted within the body.
So, since the HTML blocks you are using on e-bay have a limited lifespan ;) and you are not concerned about validation, I would go ahead and put style element wherever you please.
Thanks for helping in acquiring this piece of information :)
seems to work in Moz too.
ray326
03-23-2004, 11:02 PM
Moz == Gecko
Bigjohn
03-24-2004, 06:35 AM
Originally posted by ray326
Moz == Gecko
really? on my desktop the icon says 'mozilla firefox'. Nothin about any lizards...
toicontien
03-24-2004, 08:59 AM
Mozilla, Firebird, Firefox, Netscape 6+ and Camino all use the Gecko Runtime Environment to render Web pages. That's why Moz == Gecko.
starrwriter
03-29-2004, 12:58 AM
Originally posted by Vladdy
hmm.... that is a good one [reason]
While it is not legal, it seems like both IE and Gecko recognize the style element found in the document body and apply declaration within it correctly.
Not legal -- that kills me. It's appalling that the metaphor of criminality has come to be applied to the use of privately-owned property like a computer. Every time I see the "illegal operation" alert on my computer I feel like using a sledge hammer to make kitty litter out of it.
Bigjohn
03-30-2004, 04:52 PM
And it does not work at all in NETCRAP...at least not version 7
John
toicontien
03-30-2004, 10:21 PM
Can we see the code? The reason I'm skeptical about not getting it to work in NS7 is because NS 7 was based on the 1.0 version of the Gecko Runtime Environment. So, it should work in NS7 if it works in Mozilla... should :)
Bigjohn
03-31-2004, 05:18 AM
Originally posted by toicontien
Can we see the code? The reason I'm skeptical about not getting it to work in NS7 is because NS 7 was based on the 1.0 version of the Gecko Runtime Environment. So, it should work in NS7 if it works in Mozilla... should :)
Try HERE (http://stegenga.net/ebay/beths-listing.html)
It works in Firefox and IE5/6.
It breaks in Netcrap. Netcrap seems to ADD a <head> statement infront of the STYLE block, at least when I look at the 'view source' option....
John