Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Location
    Midlands, UK
    Posts
    649
    Thanks
    45
    Thanked 29 Times in 28 Posts

    How To Put CSS & HTML Into The Same Document?

    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
    Definition: Computer rage is a heightened physiological response with associated feelings of anger and frustration[1] resulting from using a computer or other complex electronic device. It may result in the physical assault of the computer or similar item.[2] Computer use often leads to verbal abuse and occasionally physical violence towards the object.[3] Computer rage may be caused by distress due to a hardware or software problem which the enraged person is unable to correct.

  • #2
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    you mean an external stylsheet?

    Code:
    <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!

  • #3
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Location
    Midlands, UK
    Posts
    649
    Thanks
    45
    Thanked 29 Times in 28 Posts
    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
    Last edited by Doctor_Varney; 11-03-2011 at 04:00 AM.
    Definition: Computer rage is a heightened physiological response with associated feelings of anger and frustration[1] resulting from using a computer or other complex electronic device. It may result in the physical assault of the computer or similar item.[2] Computer use often leads to verbal abuse and occasionally physical violence towards the object.[3] Computer rage may be caused by distress due to a hardware or software problem which the enraged person is unable to correct.

  • #4
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    internal stylesheet
    Code:
    <html>
       <head>
          <style type="text/css">
                div { margin: 0; }
          </style>
        </head>
    </html>
    inline styling
    Code:
    <div style="margin: 0;"></div>

  • #5
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Code:
    <style type="text/css">
     styles go here
    </script>
    </head>
    Teed

  • #6
    Registered User
    Join Date
    Jun 2011
    Posts
    1,063
    Thanks
    12
    Thanked 241 Times in 240 Posts
    Quote Originally Posted by teedoff View Post
    Code:
    <style type="text/css">
     styles go here
    </script>
    </head>
    hehe beat you to the punch

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

  • #7
    Regular Coder Doctor_Varney's Avatar
    Join Date
    Mar 2008
    Location
    Midlands, UK
    Posts
    649
    Thanks
    45
    Thanked 29 Times in 28 Posts

    Thumbs up

    Lovely! Thank you, guys.
    Definition: Computer rage is a heightened physiological response with associated feelings of anger and frustration[1] resulting from using a computer or other complex electronic device. It may result in the physical assault of the computer or similar item.[2] Computer use often leads to verbal abuse and occasionally physical violence towards the object.[3] Computer rage may be caused by distress due to a hardware or software problem which the enraged person is unable to correct.

  • #8
    Senior Coder
    Join Date
    Aug 2010
    Location
    High Point, NC
    Posts
    3,338
    Thanks
    5
    Thanked 363 Times in 360 Posts
    Quote Originally Posted by Sammy12 View Post
    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.
    Teed


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •