External Stylesheet?

They have: 4 posts

Joined: May 2006

Is there anyway to place a link to an external CSS stylesheet in the BODY, not HEAD, but BODY of an HTML document?

Thanks,
-Rusty

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Why would you want to do that in the first place? The CSS belongs in the HEAD of a page...

To link it (in the HEAD section) use the following:

<link rel="stylesheet" type="text/css" href="link_to_stylesheet.css" media="screen" />
'

He has: 490 posts

Joined: May 2005

I was wondering about that myself. Smiling

waffles's picture

They have: 54 posts

Joined: Jun 2006

I've had it in the body before. When I was first learning and thought it had to be there. You can just include it like you would anything else.

DaveyBoy's picture

They have: 453 posts

Joined: Feb 2003

Yeah i was gonna ask why you'd want to do it lol

Busy's picture

He has: 6,151 posts

Joined: May 2001

The only real way to add it to the body is hard code it, like so:

...
...

Renegade's picture

He has: 3,022 posts

Joined: Oct 2002

Theoretically, you can do it, and it will work but, it wouldn't be "correct" and once again, why would you want to do it in the first place?

Just because your eyes could have been on your chest doesn't mean it belongs there...

robbluther's picture

He has: 73 posts

Joined: Jan 2006

Ok, I want to know too... why would you want to link it in the body?
'

waffles's picture

They have: 54 posts

Joined: Jun 2006

Why not? It does the same thing no matter where it is. Maybe I just want it in the body.

Damn, that's no reason to harp on someone like that. If they want it in the body then they want it in the body. They asked how to do it, not if they should.

waffles Radio Coming to a set of speakers near you September 2006

He has: 490 posts

Joined: May 2005

Because that's just not where it is supposed to go. You don't put meta tags in the body do you?. Same with the stylesheet link. Smiling

He has: 698 posts

Joined: Jul 2005

waffles wrote: Why not? It does the same thing no matter where it is. Maybe I just want it in the body.

Damn, that's no reason to harp on someone like that. If they want it in the body then they want it in the body. They asked how to do it, not if they should.

And your question was answered and discussion followed. This is a forum to discuss webmaster issues and problems and that is what was happening.

Technically, putting the external stylesheet link in the BODY is wrong, and that is what was being discussed. Wink

Kurtis

waffles's picture

They have: 54 posts

Joined: Jun 2006

He asked if you can put it in the body. You can, include it. I'm not saying that y'all shouldn't tell him that putting it in the head is better. But answer the question before you try to make him look stupid.

waffles Radio Coming to a set of speakers near you September 2006

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.