CSS Sheet not being read for some reason??

Discussion in 'HTML' started by cayenne, Nov 24, 2003.

  1. cayenne

    cayenne Guest

    Hello all.
    I've got a very simple style sheet. It is named page1_body.css. It is
    in the same directory as my index.html file.

    Style sheet looks like:


    div.title {
    font-family: arial,courier;
    color: #A52A2A;
    border :1px;

    }

    My beginning of the index.html file is:

    <html>

    <head>
    <link REL="StyleSheet" HREF="page1_body.css" type="text/css">

    </head>

    <body>


    <div class="title">
    text here
    </div>

    </body>
    </html>

    I've simplified a page I'm starting on at home...to these simple
    lines. And yet...the css page does NOT seem to be being read at
    all...at the very least...I would expect to see a border drawn around
    the box of the text.

    Absolutely nothing.

    If in the URL, I type in the .css page instead of the .html page...it
    displays the stylesheet text in my browser...so, I would guess both
    pages are accessible.

    Anyone have any ideas what the problem is here? I've played with this
    on a similar machine...apache2, Gentoo Linux...it all works on that
    machine...but, on this one...nothing. I'm hitting it on both machines
    as local host....and have also tried it with my IP address on the home
    box. Still, it just seems for some damned reason, the index.html file
    is not pulling in the link file for the .css file.

    Any ideas/suggestions/links to info greatly appreciated!

    chilecayenne
    cayenne, Nov 24, 2003
    #1
    1. Advertising

  2. cayenne wrote:
    > I've got a very simple style sheet. It is named page1_body.css. It is
    > in the same directory as my index.html file.

    <snip>
    > I've simplified a page I'm starting on at home...to these simple
    > lines. And yet...the css page does NOT seem to be being read at
    > all...at the very least...I would expect to see a border drawn around
    > the box of the text.


    Could be because you aren't specifying a border color or type. URL?
    Leif K-Brooks, Nov 24, 2003
    #2
    1. Advertising

  3. cayenne wrote:

    > Still, it just seems for some damned reason, the index.html file
    > is not pulling in the link file for the .css file.


    It sounds like the CSS file is being served with the wrong MIME type, but
    we'd need to see a URL for sure.

    Also: <div class="title">. What is wrong with <h1>???

    Also: "font-family: arial,courier;". An interesting combination!

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Nov 24, 2003
    #3
  4. Leif K-Brooks <> wrote:

    > Could be because you aren't specifying a border color or type.


    Actually (s)he is, since
    border :1px;
    sets those properties as well. Using the border shorthand _always_ sets all
    the sub-properties border-width, border-style, border-color. Anything not
    listed in the rule is set to its initial value as specified in the CSS
    specification. For border-color that means the color of the element and for
    border-style it means none.

    So in practical terms, the shorthand is part of the problem, but technically
    it sets border-style, namely to none, even overriding any eventual setting
    in some previous rule.

    > URL?


    Indeed, a URL is needed. If the material posted tells the whole story, we
    know that conforming browsers shall _not_ draw a border, since border-style
    is definitely set to none. But we probably haven't seen the whole story, and
    we cannot tell what happens with the other rules etc.

    Why, oh why, don't people take the simple action of posting a URL in their
    original questions, speeding things up a lot when others try to help them in
    their problems?

    --
    Yucca, http://www.cs.tut.fi/~jkorpela/
    Pages about Web authoring: http://www.cs.tut.fi/~jkorpela/www.html
    Jukka K. Korpela, Nov 24, 2003
    #4
  5. cayenne

    Ryan Stewart Guest

    "Toby A Inkster" <> wrote in message
    news:p...
    > cayenne wrote:
    >
    > > Still, it just seems for some damned reason, the index.html file
    > > is not pulling in the link file for the .css file.

    >
    > It sounds like the CSS file is being served with the wrong MIME type, but
    > we'd need to see a URL for sure.
    >
    > Also: <div class="title">. What is wrong with <h1>???
    >
    > Also: "font-family: arial,courier;". An interesting combination!
    >
    > --
    > Toby A Inkster BSc (Hons) ARCS
    > Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    >

    In my experience, the built-in header tags (h1, h2, etc) create sometimes
    unwanted vertical white space below them.

    --
    Ryan Stewart, A1C USAF
    805 CSPTS/SCBE
    Ryan Stewart, Nov 25, 2003
    #5
  6. cayenne

    Steve Pugh Guest

    "Ryan Stewart" <> wrote:
    >"Toby A Inkster" <> wrote:
    >>
    >> Also: <div class="title">. What is wrong with <h1>???
    >>

    >In my experience, the built-in header tags (h1, h2, etc) create sometimes
    >unwanted vertical white space below them.


    And?
    CSS is being used to suggest a presentation here.
    So CSS can be used to suggest that h1 has no margins.

    Steve

    --
    "My theories appal you, my heresies outrage you,
    I never answer letters and you don't like my tie." - The Doctor

    Steve Pugh <> <http://steve.pugh.net/>
    Steve Pugh, Nov 25, 2003
    #6
  7. Ryan Stewart wrote:

    > "Toby A Inkster" <> wrote in message
    > news:p...
    >> cayenne wrote:
    >>
    >>> Still, it just seems for some damned reason, the index.html file
    >>> is not pulling in the link file for the .css file.

    >>
    >> Also: <div class="title">. What is wrong with <h1>???

    >
    > In my experience, the built-in header tags (h1, h2, etc) create sometimes
    > unwanted vertical white space below them.


    h1 {
    padding-bottom: 0;
    margin-bottom: 0;
    /* or whatever you want */
    }

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
    Toby A Inkster, Nov 25, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. news.iq.ca
    Replies:
    0
    Views:
    526
    news.iq.ca
    Jan 21, 2005
  2. =?Utf-8?B?Q2FtbWllIFdhdHNvbg==?=

    CSS style sheet not showing correctly on the server

    =?Utf-8?B?Q2FtbWllIFdhdHNvbg==?=, Nov 28, 2005, in forum: ASP .Net
    Replies:
    5
    Views:
    915
    =?Utf-8?B?Q2FtbWllIFdhdHNvbg==?=
    Nov 29, 2005
  3. Evad Lehso
    Replies:
    0
    Views:
    82
    Evad Lehso
    Aug 4, 2010
  4. Sara
    Replies:
    0
    Views:
    98
  5. Replies:
    3
    Views:
    94
    Evertjan.
    Sep 3, 2006
Loading...

Share This Page