[AWS] CSS style sheet

Adrian Hoe 贺文耀 mailbox at adrianhoe.com
Wed Dec 9 15:58:22 CET 2009


My css seems not working with my AWS app but it works on an apache  
server.

My AWS app resides in say /app and my document root is pointing to / 
app/www where my index.thtml is.

In /app/www, there are two other folders, "common" and "static". I  
have a file called header.thtml in /app/www/common and my css files  
are located in /app/www/static. The header.thtml is included in  
index.thtml with following statement:

@@INCLUDE@@ ./common/header.thtml

And in header.thtml, I have:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
   <head>
     <title>
	@@IF@@ @_EXIST:$1_@
@_$1_@ |
	@@END_IF@@
         Example
     </title>
     <meta http-equiv="Content-Type" content="text/html;  
charset=UTF-8" />
     <link rel="stylesheet" id="style-css" type="text/css"
href="/static/style.css" media="all">
</head>
@@INLINE@@
<body class="foo"
@@IF@@ @_EXIST:$2_@
onload="@_$2_@ ();"
@@END_IF@@
 >

The page is displayed plain without any formating as defined in css. I  
copied the html source from the browser and uploaded both the html and  
css to an apache server, the html is displayed correctly.

What is possibly wrong?

Thanks.



On Dec 9, 2009, at 10:38 PM, Emmanuel Briot wrote:

>> Again, I may have overlook the AWS documentation. How to get a web
>> page displayed according to the css style sheet? I am wondering if  
>> css
>> is supported by AWS. If css is not supported, then how can I format  
>> my
>> web page in the html template?
>
> That's not related to AWS at all. You simply insert the proper  
> <link> in your
> html. The client will then query AWS (or apache depending on the  
> URL) for a
> ".css" file, which you can serve through AWS as a standard file.
>
> regards,
>
> Emmanuel
>

--
"If you missed the rising sun and the morning dew, don't miss the  
beautiful sunset." -- Adrian Hoe inspired by Michal Nowak, June 15 2004
http://adrianhoe.com
http://adrianhoe.net




More information about the AWS mailing list