ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

newbie having trouble linking my css

August 21, 2007 1:52pm

Subscribe [3]
  • #1 / Aug 21, 2007 1:52pm

    julie p

    282 posts

    hi all.  i just started using EE today.  i have a lot to learn.  i just want to link a stylesheet.  here’s what i have:

    Templates:
    1. photos [index(i want to use a css here)]
    2. stylesheets [style (this is the css) I created it as a stylesheet type]

    In index, I have the following code:

    <!DOCTYPE html PUBLIC “-//W3C//DTD XHTML 1.0 Transitional//EN” “http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd”>
    <html xmlns=“http://www.w3.org/1999/xhtml”>
    <head>
    <meta http-equiv=“Content-Type” content=“text/html; charset=utf-8” />
    <link rel=“stylesheet” type=“text/css” media=“all” href=”{stylesheet=stylesheets/style}” />
    <title>title</title>
    </head>
    <body>
    this is the photos page
    </body>
    </html>

    in style i have the following code:
    body{
    background-color:#666666;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    color:#00FF00;
    }

    The page loads, but does not apply the style.  Ideas?  This seems so simple yet I cannot accomplish my goal!!!

    thanks so much!

  • #2 / Aug 21, 2007 5:49pm

    e-man

    1816 posts

    This:

    href="{stylesheet=stylesheets/style}

    means you have a template group called stylesheets with inside a template called style.
    Are you sure that’s what you have? Check it.

  • #3 / Aug 21, 2007 6:53pm

    julie p

    282 posts

    yeah - i just recreated it just to make sure.  any chance this can be a server permissions thing?

  • #4 / Aug 21, 2007 7:07pm

    e-man

    1816 posts

    yeah - i just recreated it just to make sure.  any chance this can be a server permissions thing?

    Try this:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
            "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
    <head>
        <meta http-equiv="content-type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" media="all" href="{stylesheet=stylesheets/style}" />
    <title>title</title>
    </head>
    <body>
    this is the photos page
    </body>
    </html>

    I think there’s an error in your doctype. This works for me so…

  • #5 / Aug 21, 2007 7:58pm

    julie p

    282 posts

    YOU GOT IT!! thanks so much!  stupid doctype….

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases