...

View Full Version : How To Put CSS & HTML Into The Same Document?



Doctor_Varney
11-03-2011, 02:39 AM
I am writing a CV and want the style sheet inside (at the top) of the HTML. I have always, since day one, written my stylesheet as a seperate document and linked it in and that's the only way I know. Please can anyone advise me precisely where I should enter the CSS when integrating it into the same document?

Thanking you

Dr. V

Sammy12
11-03-2011, 02:42 AM
you mean an external stylsheet?



<html>
<head>
<link rel="stylesheet" type="text/css" media="screen" href="style/global.css"/>
</head>
<body>

</body>
</html>


to incorporate it on every page you would use php build functions. It doesn't matter where the <link> is in the <head> I'm not sure what is the question you are asking though!

Doctor_Varney
11-03-2011, 02:50 AM
No, no... I mean an INTERNAL stylesheet. As I said, I already know how to link in an external stylesheet. It's simply a one page CV, so it will only have to be incorporated once.

I just want to know where exactly you're supposed to put the CSS in the document.

Thanks again.

Dr. V

Sammy12
11-03-2011, 02:59 AM
internal stylesheet


<html>
<head>
<style type="text/css">
div { margin: 0; }
</style>
</head>
</html>


inline styling


<div style="margin: 0;"></div>

teedoff
11-03-2011, 02:59 AM
<style type="text/css">
styles go here
</script>
</head>

Sammy12
11-03-2011, 03:01 AM
<style type="text/css">
styles go here
</script>
</head>

hehe beat you to the punch

I'm guessing you were rushing that
</style>

Doctor_Varney
11-03-2011, 03:02 AM
Lovely! Thank you, guys. :thumbsup:

teedoff
11-03-2011, 03:19 AM
hehe beat you to the punch

I'm guessing you were rushing that
</style>

lol yep...and I was actually working with some javascript, so I had the script tag in my head.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum