css question

Sharky Forums


Results 1 to 3 of 3

Thread: css question

  1. #1
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203

    css question

    I'm really not a web page person, but do have to write html occasionally. I currently need to write a single page document and want to use the company css file. This all works fine, but I'd rather be able to distribute the document itself alone (that is, I don't want to have to send the .css file with it). I'm sure there's syntax for this, I just don't know it:

    How do I embed the .css info into the html file?

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

  2. #2
    Ursus Arctos Moderatis Grizzly's Avatar
    Join Date
    Sep 2000
    Location
    Providence, RI USA
    Posts
    3,077
    Inbetween the <head></head> tags, you can do something like:

    <style type="text/css">
    .myClass{
    font-weight:bold;
    }
    </style>

  3. #3
    NullPointerException rock's Avatar
    Join Date
    Sep 2000
    Location
    York, PA
    Posts
    6,203
    I guess I didn't realize the @import just does a literal import of the css file. I just copied the whole .css file between <style type="text/css"> </style> tags. That seems to work. Thanks.

    Open Source is free like a puppy is free.

    It's only when you look at an ant through a magnifying glass on a sunny day that you realise how often they burst into flames.

    Understanding Evolution

Posting Permissions

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